X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fnasal%2Flex.c;h=89c3c407b28c578181f07c4e460c684ea8fe591d;hb=bcb320b537b6f7e5e3724e8a30d309322171eb43;hp=a3c1ffc699aa39e6001cbf7185b894f6725a145b;hpb=8687b214e7f19c327a65e2022958d9919631707f;p=simgear.git 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