mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2025-01-13 15:28:04 +03:00
Fix sockets crash (#418)
This commit is contained in:
parent
6a553122b1
commit
b7773ba11f
@ -203,9 +203,10 @@ static cell AMX_NATIVE_CALL socket_recv(AMX *amx, cell *params)
|
|||||||
int current_length = 0;
|
int current_length = 0;
|
||||||
int max_length = length - 1;
|
int max_length = length - 1;
|
||||||
|
|
||||||
|
const char *buffer = recv_buffer;
|
||||||
while(max_length-- && current_length < bytes_received)
|
while(max_length-- && current_length < bytes_received)
|
||||||
{
|
{
|
||||||
*destination++ = (cell)*recv_buffer++;
|
*destination++ = (cell)*buffer++;
|
||||||
current_length++;
|
current_length++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user