mirror of
https://github.com/alliedmodders/sourcemod.git
synced 2025-12-07 02:18:35 +00:00
Fix SDKCall NULL_STRING
This commit is contained in:
parent
1bcc5b8a44
commit
faee3f1996
@ -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