mirror of
https://github.com/alliedmodders/sourcemod.git
synced 2025-12-07 10:28:34 +00:00
Fixed crash caused by FileDownloader´s unimplemented GetBuffer()
This commit is contained in:
parent
a3b3719254
commit
fd79125026
@ -514,8 +514,11 @@ static cell_t HTTP_GetBodyContent(IPluginContext *pCtx, const cell_t *params)
|
||||
return pCtx->ThrowNativeError("Buffer too small\n");
|
||||
}
|
||||
|
||||
memcpy(body, dldr->GetBuffer(), params[3]);
|
||||
body[dldr->GetSize()] = '\0';
|
||||
if (dldr->GetBuffer() != NULL)
|
||||
{
|
||||
memcpy(body, dldr->GetBuffer(), params[3]);
|
||||
body[dldr->GetSize()] = '\0';
|
||||
}
|
||||
|
||||
return pCtx->StringToLocal(params[2], params[3], body);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user