From: Dan White Date: Tue, 14 May 2013 16:32:41 +0000 (-0500) Subject: msp4th: bugfix o2w, save some bytes X-Git-Tag: cheetah~75 X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=f0518396ba867ce83019494733362c5b5d05b168;p=430.git msp4th: bugfix o2w, save some bytes --- diff --git a/msp4th/msp4th.c b/msp4th/msp4th.c index 96b8e5b..432ea15 100644 --- a/msp4th/msp4th.c +++ b/msp4th/msp4th.c @@ -767,9 +767,10 @@ void opcode2wordFunc(void) // walk list to get word // skip to start of the expected location while (n < opcode) { - while (*list >= ' ') { + while (*list > ' ') { list++; } + list++; n++; } @@ -1007,7 +1008,6 @@ void printHexChar(int16_t n) void printHexByte(int16_t n) { - n &= 0xFF; printHexChar(n >> 4); printHexChar(n); } @@ -1015,7 +1015,8 @@ void printHexByte(int16_t n) void printHexWord(int16_t n) { - printHexByte(n >> 8); + // suppress sign bit extension + printHexByte((uint16_t)n >> 8); printHexByte(n); }