From 6a77e04a8e350578ad590297ebb29717a2a9878c Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Sat, 22 Apr 2017 21:28:44 -0400 Subject: [PATCH] Fix default value always being when calling ParmValue(string,string). --- core/smn_commandline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/smn_commandline.cpp b/core/smn_commandline.cpp index 570d6474..890db121 100644 --- a/core/smn_commandline.cpp +++ b/core/smn_commandline.cpp @@ -64,7 +64,7 @@ static cell_t sm_GetCommandLineParam(IPluginContext *pCtx, const cell_t *params) char *param = NULL; char *defValue = NULL; pCtx->LocalToString(params[1], ¶m); - pCtx->LocalToString(params[4], ¶m); + pCtx->LocalToString(params[4], &defValue); const char *value = pCmdLine->ParmValue(param, defValue);