From 5a195bdd7b2dd1f757d13e11c386807289178a29 Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Sat, 25 Nov 2006 10:54:41 +0000 Subject: [PATCH] Fix vsprintf bug, thanks to ensiform. --- code/game/bg_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/bg_lib.c b/code/game/bg_lib.c index 787a9ea2..997b9c94 100644 --- a/code/game/bg_lib.c +++ b/code/game/bg_lib.c @@ -1067,7 +1067,7 @@ void AddInt( char **buf_p, int val, int width, int flags ) { } if( flags & LADJUST ) { - while ( width-- ) { + while ( width-- > 0) { *buf++ = ( flags & ZEROPAD ) ? '0' : ' '; } }