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:
parent
43af1a130e
commit
bb40b22125
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user