From 37b480349332af704828e0b5b01cb92eb9a9c920 Mon Sep 17 00:00:00 2001 From: zicodxx <> Date: Tue, 1 Dec 2009 14:50:09 +0000 Subject: [PATCH] Squishing string-related bugs in Bomb display and Weapon reordering --- CHANGELOG.txt | 4 ++++ main/gauges.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 44ae520e3..ec76939b0 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,9 @@ D1X-Rebirth Changelog +20091201 +-------- +main/gauges.c: Squishing string-related bugs in Bomb display and Weapon reordering + 20091130 -------- d1x-rebirth/arch/carbon/conf.h, d1x-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 aa148c34d..c50441f3f 100644 --- a/main/gauges.c +++ b/main/gauges.c @@ -979,9 +979,9 @@ void show_bomb_count(int x,int y,int bg_color,int always_show,int right_align) bomb = PROXIMITY_INDEX; 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; @@ -993,7 +993,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'