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