From d7f29662160ab64d594b4fd5815de50e04d05630 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 30 Sep 2008 21:52:44 +0000 Subject: [PATCH] Yeah, I really shouldn't be in the lexer --- simgear/nasal/lex.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/simgear/nasal/lex.c b/simgear/nasal/lex.c index a3c1ffc6..89c3c407 100644 --- a/simgear/nasal/lex.c +++ b/simgear/nasal/lex.c @@ -257,6 +257,7 @@ static int lexHexLiteral(struct Parser* p, int index) } #define ISNUM(c) ((c) >= '0' && (c) <= '9') +#define ISHEX(c) (ISNUM(c) || ((c)>='a' && (c)<='f') || ((c)>='A' && (c)<='F')) #define NUMSTART(c) (ISNUM(c) || (c) == '+' || (c) == '-') static int lexNumLiteral(struct Parser* p, int index) { @@ -264,7 +265,7 @@ static int lexNumLiteral(struct Parser* p, int index) unsigned char* buf = (unsigned char*)p->buf; double d; - if(buf[i] == '0' && i+2