diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 2c935d347..5e8e05dee 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,9 @@ D2X-Rebirth Changelog +20091201 +-------- +main/gauges.c, main/weapon.c: Squishing string-related bugs in Bomb display and Weapon reordering + 20091130 -------- d2x-rebirth.xcodeproj/project.pbxproj: Update to not compile redundant net_ipx.c for Mac OS X diff --git a/main/gauges.c b/main/gauges.c index 242d0d7f2..a2d4506e8 100644 --- a/main/gauges.c +++ b/main/gauges.c @@ -1112,9 +1112,9 @@ void show_bomb_count(int x,int y,int bg_color,int always_show,int right_align) bomb = which_bomb(); count = Players[Player_num].secondary_ammo[bomb]; - #ifndef RELEASE +// #ifndef RELEASE count = min(count,99); //only have room for 2 digits - cheating give 200 - #endif +// #endif countx = (bomb==PROXIMITY_INDEX)?count:-count; @@ -1126,7 +1126,7 @@ void show_bomb_count(int x,int y,int bg_color,int always_show,int right_align) else gr_set_fontcolor(bg_color,bg_color); //erase by drawing in background color - sprintf(txt,"B:%02d",count); + snprintf(txt, sizeof(txt), "B:%02d", count); while ((t=strchr(txt,'1')) != NULL) *t = '\x84'; //convert to wide '1' diff --git a/main/weapon.c b/main/weapon.c index 28a23f543..a8711f1d5 100644 --- a/main/weapon.c +++ b/main/weapon.c @@ -570,15 +570,12 @@ void ReorderPrimary () { newmenu_item m[MAX_PRIMARY_WEAPONS+1]; int i; - char never_autoselect[32]=""; - - sprintf(never_autoselect,"%s%s%s%s%s%s%s Never Autoselect %s%s%s%s%s%s%s",DOWN_ARROW_MARKER,DOWN_ARROW_MARKER,DOWN_ARROW_MARKER,DOWN_ARROW_MARKER,DOWN_ARROW_MARKER,DOWN_ARROW_MARKER,DOWN_ARROW_MARKER,DOWN_ARROW_MARKER,DOWN_ARROW_MARKER,DOWN_ARROW_MARKER,DOWN_ARROW_MARKER,DOWN_ARROW_MARKER,DOWN_ARROW_MARKER,DOWN_ARROW_MARKER); for (i=0;i