From df42d77861777104372551918343d06f16032f93 Mon Sep 17 00:00:00 2001 From: Dan White Date: Thu, 2 May 2013 11:54:52 -0500 Subject: [PATCH] msp4th: allow case-insensitive hex digits --- msp4th/msp4th.c | 5 +++++ 1 file changed, 5 insertions(+) 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; } -- 2.25.1