From 2df4f00376824798bed7478177828e094d470162 Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Wed, 12 May 2004 00:54:30 +0000 Subject: [PATCH] dpas_parse_hex: ignore the 'H' on the end of a hexadecimal constant. --- ChangeLog | 3 +++ dpas/dpas-scanner.l | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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); } -- 2.47.3