Another small fix to nbprintf.cpp

Discussion to talk about software related topics only.
Post Reply
joepasquariello
Posts: 85
Joined: Mon Apr 28, 2008 7:32 am

Another small fix to nbprintf.cpp

Post by joepasquariello »

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;
Post Reply