From 2c8808aaff48afe841b41d8c17707c3858c4823b Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 11 Feb 2006 22:48:29 +0000 Subject: [PATCH] fixed formatter bug on bad control code --- amxmodx/CLang.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/amxmodx/CLang.cpp b/amxmodx/CLang.cpp index dbc1a2f3..0a6d70df 100755 --- a/amxmodx/CLang.cpp +++ b/amxmodx/CLang.cpp @@ -398,6 +398,8 @@ size_t do_amx_format_parameter(AMX *amx, cell *params, const char **fmtstr, int } //get the final character ctrl_code = fmtsrc[len++]; + if (!ctrl_code) + return 0; //inc the source pointer *fmtstr = &(fmtsrc[len]); //finalize the string