Another small fix to nbprintf.cpp
Posted: Sat Mar 26, 2011 1:46 pm
Paul,
NB_internal_printf() has no case for 'h', so if the format "%hu", "%hd", "%hX", etc. is used, it prints the character 'u', 'd', 'X', etc. instead of printing a numeric value. I added a case for 'h' as shown below, and that seems to fix the problem. The value pushed to the stack is always 32 bits for "short", "int", and "long"?
Joe
case 'h': // JWP 03/26/11 added this case to fix "%hu", "%hd", "%hX", etc.
case 'H':
case 'l':
case 'L':
break;
NB_internal_printf() has no case for 'h', so if the format "%hu", "%hd", "%hX", etc. is used, it prints the character 'u', 'd', 'X', etc. instead of printing a numeric value. I added a case for 'h' as shown below, and that seems to fix the problem. The value pushed to the stack is always 32 bits for "short", "int", and "long"?
Joe
case 'h': // JWP 03/26/11 added this case to fix "%hu", "%hd", "%hX", etc.
case 'H':
case 'l':
case 'L':
break;