X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fnasal%2Flex.c;h=89c3c407b28c578181f07c4e460c684ea8fe591d;hb=bcb320b537b6f7e5e3724e8a30d309322171eb43;hp=685393ad24447b0159f5306e61789e9b4f736104;hpb=f5f1f0da8e8d058de2f580df2254a987aaf7f666;p=simgear.git diff --git a/simgear/nasal/lex.c b/simgear/nasal/lex.c index 685393ad..89c3c407 100644 --- a/simgear/nasal/lex.c +++ b/simgear/nasal/lex.c @@ -257,15 +257,16 @@ static int lexHexLiteral(struct Parser* p, int index) } #define ISNUM(c) ((c) >= '0' && (c) <= '9') -#define NUMSTART(c) (ISNUM(c) || (c)=='+' || (c) == '-') +#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) { int len = p->len, i = index; unsigned char* buf = (unsigned char*)p->buf; double d; - if(buf[0] == '0' && i+1