mirror of
https://github.com/alliedmodders/sourcemod.git
synced 2025-12-07 18:38:37 +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");
|
return pCtx->ThrowNativeError("Buffer too small\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dldr->GetBuffer() != NULL)
|
||||||
|
{
|
||||||
memcpy(body, dldr->GetBuffer(), params[3]);
|
memcpy(body, dldr->GetBuffer(), params[3]);
|
||||||
body[dldr->GetSize()] = '\0';
|
body[dldr->GetSize()] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
return pCtx->StringToLocal(params[2], params[3], body);
|
return pCtx->StringToLocal(params[2], params[3], body);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user