From: Dan White Date: Thu, 2 May 2013 16:54:52 +0000 (-0500) Subject: msp4th: allow case-insensitive hex digits X-Git-Tag: bootrom-initial-submission~17 X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=df42d77861777104372551918343d06f16032f93;p=430.git msp4th: allow case-insensitive hex digits --- diff --git a/msp4th/msp4th.c b/msp4th/msp4th.c index 16131f7..9cf9e9f 100644 --- a/msp4th/msp4th.c +++ b/msp4th/msp4th.c @@ -617,6 +617,11 @@ void numFunc() n = n + wordBuffer[i] - '0'; if(wordBuffer[i] > '9'){ n = n - 7; + + // compensate for lowercase digits + if (wordBuffer[i] >= 'a') { + n -= 0x20; + } } i = i + 1; }