From b1da73f99fc8208977f7ccf08b991c05b148f8b8 Mon Sep 17 00:00:00 2001 From: Lorenc Pekaj Date: Fri, 2 Nov 2018 09:52:23 +1100 Subject: [PATCH] prefix fix for number_format --- gamemodes/irresistible/helpers.pwn | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gamemodes/irresistible/helpers.pwn b/gamemodes/irresistible/helpers.pwn index 0f1f79b..8fb77e5 100644 --- a/gamemodes/irresistible/helpers.pwn +++ b/gamemodes/irresistible/helpers.pwn @@ -349,9 +349,13 @@ stock number_format( { _, Float, Text3D, Menu, Text, DB, DBResult, bool, File }: } } - if ( prefix != '\0' ) { - // new minus = strfind( s_szReturn, "-" ); - strins( s_szReturn, "$", s_szReturn[ 0 ] == '-' ); // no point finding - + if ( prefix != '\0' ) + { + static + prefix_string[ 2 ]; + + prefix_string[ 0 ] = prefix; + strins( s_szReturn, prefix_string, s_szReturn[ 0 ] == '-' ); // no point finding - } return s_szReturn; }