fixed formatter bug on bad control code

This commit is contained in:
David Anderson 2006-02-11 22:48:29 +00:00
parent 82693ccae6
commit 2c8808aaff

View File

@ -398,6 +398,8 @@ size_t do_amx_format_parameter(AMX *amx, cell *params, const char **fmtstr, int
} }
//get the final character //get the final character
ctrl_code = fmtsrc[len++]; ctrl_code = fmtsrc[len++];
if (!ctrl_code)
return 0;
//inc the source pointer //inc the source pointer
*fmtstr = &(fmtsrc[len]); *fmtstr = &(fmtsrc[len]);
//finalize the string //finalize the string