mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-09-29 07:21:58 +02:00
11385: parse 0[0-9]+ as octal in arithmetic expressions
This commit is contained in:
parent
0e5666e2ad
commit
18b193f241
@ -1,3 +1,8 @@
|
||||
2000-05-15 Clint Adams <schizo@debian.org>
|
||||
* 11385: Src/math.c: interpret integer constants beginning
|
||||
with '0' as octal to conform to IEEE Std 1003.2-1992
|
||||
(ISO 9945-2:1993).
|
||||
|
||||
2000-05-15 Sven Wischnowsky <wischnow@zsh.org>
|
||||
|
||||
* 11380: Src/subst.c: detect additional characters in parameter
|
||||
|
@ -357,6 +357,10 @@ zzlex(void)
|
||||
yyval.u.l = zstrtol(++ptr, &ptr, lastbase = 16);
|
||||
return NUM;
|
||||
}
|
||||
else if (idigit(*ptr) && (memchr(ptr, '.', strlen(ptr)) == NULL)) {
|
||||
yyval.u.l = zstrtol(ptr, &ptr, lastbase = 8);
|
||||
return NUM;
|
||||
}
|
||||
/* Fall through! */
|
||||
default:
|
||||
if (idigit(*--ptr) || *ptr == '.') {
|
||||
|
Loading…
Reference in New Issue
Block a user