From 21c46f76e1429267b16b4f9a38927b2ad06a566f Mon Sep 17 00:00:00 2001 From: vidur Date: Tue, 30 Jun 1998 02:23:59 +0000 Subject: [PATCH] Deal with hex values in numerical values --- dom/tools/IdlScanner.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dom/tools/IdlScanner.cpp b/dom/tools/IdlScanner.cpp index 3d58827414e..78d3040ead4 100644 --- a/dom/tools/IdlScanner.cpp +++ b/dom/tools/IdlScanner.cpp @@ -1127,9 +1127,16 @@ void IdlScanner::Number(int aStartChar, Token *aToken) } do { - value = value * base + (aStartChar - '0'); + long digit; + if (isdigit(aStartChar)) { + digit = aStartChar - '0'; + } + else { + digit = 10 + (aStartChar - 'a'); + } + value = value * base + digit; aStartChar = mInputFile->get(); - } while (isdigit(aStartChar)); + } while ((' ' != aStartChar) && ('.' != aStartChar)); if (aStartChar == '.') { // double. Deal with it later