Add NULL check to GetEntPropString return. (#1376)

This can be NULL for non-interned strings that don't have a value set.
This commit is contained in:
Nicholas Hastings
2020-10-27 18:51:12 -04:00
committed by GitHub
parent 94ea925152
commit 8e7d41ec02
+6
View File
@@ -2201,9 +2201,15 @@ static cell_t GetEntPropString(IPluginContext *pContext, const cell_t *params)
}
}
if (src)
{
size_t len;
pContext->StringToLocalUTF8(params[4], params[5], src, &len);
return len;
}
pContext->StringToLocal(params[4], params[5], "");
return 0;
}
static cell_t SetEntPropString(IPluginContext *pContext, const cell_t *params)