mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
Merge pull request #235 from Arkshine/fix/file-fgets
Fix fgets native not setting always the plugin buffer
This commit is contained in:
commit
0bfc04bb14
@ -622,10 +622,7 @@ static cell AMX_NATIVE_CALL amx_fgets(AMX *amx, cell *params)
|
||||
static char buffer[4096];
|
||||
buffer[0] = '\0';
|
||||
|
||||
if (!fp->ReadLine(buffer, sizeof(buffer) - 1))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
fp->ReadLine(buffer, sizeof(buffer) - 1);
|
||||
|
||||
return set_amxstring_utf8(amx, params[2], buffer, strlen(buffer), params[3] + 1); // + EOS
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user