about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2001-07-08 00:30:43 +0000
committerBart Schaefer <barts@users.sourceforge.net>2001-07-08 00:30:43 +0000
commit0467a101dacffaf7b32716708d4557afa9c27c4f (patch)
treea538568ad45e1bfbd4ba422136cd9c50dc72789a
parent2c75f5b0da61fa703b0b4f9dc12143aad5e00017 (diff)
downloadzsh-0467a101dacffaf7b32716708d4557afa9c27c4f.tar.gz
zsh-0467a101dacffaf7b32716708d4557afa9c27c4f.tar.xz
zsh-0467a101dacffaf7b32716708d4557afa9c27c4f.zip
Don't always coerce to float when assigning to an unset parameter.
-rw-r--r--Src/math.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/math.c b/Src/math.c
index 5e4b67c9b..755026b6c 100644
--- a/Src/math.c
+++ b/Src/math.c
@@ -641,7 +641,8 @@ op(int what)
 		b.type = MN_INTEGER;
 		b.u.l = (zlong)b.u.d;
 	    }
-	} else if (a.type != b.type && what != COMMA) {
+	} else if (a.type != b.type && what != COMMA &&
+		   (a.type != MN_UNSET || what != EQ)) {
 	    /*
 	     * Different types, so coerce to float.
 	     * It may happen during an assigment that the LHS