fixed a bug where GetCmdArgString() would crash on 0 parameters

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40639
This commit is contained in:
David Anderson 2007-03-16 20:10:34 +00:00
parent 43af1a130e
commit bb40b22125

View File

@ -435,6 +435,11 @@ static cell_t sm_GetCmdArgString(IPluginContext *pContext, const cell_t *params)
{
const char *args = engine->Cmd_Args();
if (!args)
{
args = "";
}
pContext->StringToLocalUTF8(params[1], params[2], args, NULL);
return 1;