mirror of
https://github.com/alliedmodders/sourcemod.git
synced 2025-12-06 18:08:36 +00:00
Fix SDKCall NULL_STRING (#2178)
This commit is contained in:
parent
34e9605519
commit
2be15ff629
@ -575,7 +575,13 @@ DataStatus DecodeValveParam(IPluginContext *pContext,
|
||||
case Valve_String:
|
||||
{
|
||||
char *addr;
|
||||
pContext->LocalToString(param, &addr);
|
||||
pContext->LocalToStringNULL(param, &addr);
|
||||
if (addr == NULL && (data->decflags & VDECODE_FLAG_ALLOWNULL) == 0)
|
||||
{
|
||||
pContext->ThrowNativeError("NULL not allowed");
|
||||
return Data_Fail;
|
||||
}
|
||||
|
||||
*(char **)buffer = addr;
|
||||
return Data_Okay;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user