ref: 2883d0179563960dacbe4c97ec78f3822aca7c29
parent: a71f0ed6bf7bac612633c2c2b745d6bf2b45d314
author: Roberto E. Vargas Caballero <[email protected]>
date: Wed Oct 7 08:36:51 EDT 2015
Fix conversion of hexadecimal constants It is possible to have upper case or lower case letters in hexadecimal numbers, and the expression was only valid for upper case.
--- a/cc1/lex.c
+++ b/cc1/lex.c
@@ -273,7 +273,7 @@
++s;
for (u = 0; isxdigit(c = *s++); u = u*base + val) {
- val = (c <= '9') ? c - '0' : 10 + c - 'A';
+ val = (c <= '9') ? c - '0' : 10 + toupper(c) - 'A';
repeat:
if (u <= max/base && u*base <= max - val)
continue;