about summary refs log tree commit diff
path: root/Src/math.c
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2012-12-08 19:50:20 +0000
committerBart Schaefer <barts@users.sourceforge.net>2012-12-08 19:50:20 +0000
commit431c22024d8af440ca4b79ce951896f3bcd0d7cc (patch)
treeb1537203e66121da529463e322dc0e4830b8a02a /Src/math.c
parent968a7a2a51065ee39c647ab088f39a36dbba2ac7 (diff)
downloadzsh-431c22024d8af440ca4b79ce951896f3bcd0d7cc.tar.gz
zsh-431c22024d8af440ca4b79ce951896f3bcd0d7cc.tar.xz
zsh-431c22024d8af440ca4b79ce951896f3bcd0d7cc.zip
users/17445: fix handling of leading zeroes in floating point
Diffstat (limited to 'Src/math.c')
-rw-r--r--Src/math.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/math.c b/Src/math.c
index abc5f994e..e90d6a59a 100644
--- a/Src/math.c
+++ b/Src/math.c
@@ -447,7 +447,8 @@ lexconstant(void)
     if (*nptr == '-')
 	nptr++;
 
-    if (*nptr == '0')
+    if (*nptr == '0' &&
+	(memchr(nptr, '.', strlen(nptr)) == NULL))
     {
 	nptr++;
 	if (*nptr == 'x' || *nptr == 'X') {