From bb40b2212521db22b5832736a6bdcd4645174513 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 16 Mar 2007 20:10:34 +0000 Subject: [PATCH] fixed a bug where GetCmdArgString() would crash on 0 parameters --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40639 --- core/smn_console.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/smn_console.cpp b/core/smn_console.cpp index 8fbeb437..8bcb5c37 100644 --- a/core/smn_console.cpp +++ b/core/smn_console.cpp @@ -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;