From: Rhys Weatherley Date: Wed, 12 May 2004 00:54:30 +0000 (+0000) Subject: dpas_parse_hex: ignore the 'H' on the end of a hexadecimal constant. X-Git-Tag: r.0.0.2~9 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=2df4f00376824798bed7478177828e094d470162;p=francis%2Flibjit.git dpas_parse_hex: ignore the 'H' on the end of a hexadecimal constant. --- diff --git a/ChangeLog b/ChangeLog index 9ee72f2..9e82f76 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17,6 +17,9 @@ * include/jit/jit-defs.h.in: incorrect values for jit_max_int and jit_max_long. + * dpas/dpas-scanner.l (dpas_parse_hex): ignore the 'H' on the + end of a hexadecimal constant. + 2004-05-11 Rhys Weatherley * include/jit/jit-insn.h, jit/jit-insn.c, jit/jit-interp.cpp, diff --git a/dpas/dpas-scanner.l b/dpas/dpas-scanner.l index 3d6c0ce..278abbb 100644 --- a/dpas/dpas-scanner.l +++ b/dpas/dpas-scanner.l @@ -133,7 +133,7 @@ static void dpas_parse_hex(const char *text, YYSTYPE *lval) { value = value * 16 + (jit_ulong)(*text - 'A' + 10); } - else + else if(*text >= 'a' && *text <= 'f') { value = value * 16 + (jit_ulong)(*text - 'a' + 10); }