mirror of
https://github.com/alliedmodders/sourcemod.git
synced 2025-12-07 02:18:35 +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:
|
case Valve_String:
|
||||||
{
|
{
|
||||||
char *addr;
|
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;
|
*(char **)buffer = addr;
|
||||||
return Data_Okay;
|
return Data_Okay;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user