Fixed a bug which was causing decimal constants less than zero to be interpreted as octal

git-svn-id: http://picoc.googlecode.com/svn/trunk@308 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
zik.saleeba 2009-05-29 00:40:45 +00:00
parent c1381adae5
commit 022e09a7a6
2 changed files with 2 additions and 2 deletions

2
lex.c
View file

@ -144,7 +144,7 @@ enum LexToken LexGetNumber(struct LexState *Lexer, struct Value *Value)
{ Base = 16; Lexer->Pos++; } { Base = 16; Lexer->Pos++; }
else if (*Lexer->Pos == 'b' || *Lexer->Pos == 'B') else if (*Lexer->Pos == 'b' || *Lexer->Pos == 'B')
{ Base = 2; Lexer->Pos++; } { Base = 2; Lexer->Pos++; }
else else if (*Lexer->Pos != '.')
Base = 8; Base = 8;
} }
} }

View file

@ -48,7 +48,7 @@
# ifndef NO_FP # ifndef NO_FP
# include <math.h> # include <math.h>
# define PICOC_MATH_LIBRARY # define PICOC_MATH_LIBRARY
# define NEED_MATH_LIBRARY # undef NEED_MATH_LIBRARY
# undef BIG_ENDIAN # undef BIG_ENDIAN
#endif #endif