From 10c0204b168784f003f5567be9b39df9ed9f2850 Mon Sep 17 00:00:00 2001 From: Arkshine Date: Sun, 12 Apr 2015 20:20:21 +0200 Subject: [PATCH] Fix fgets native not setting the plugin buffer on null result --- amxmodx/file.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/amxmodx/file.cpp b/amxmodx/file.cpp index a5e1981e..8d3c8d3f 100755 --- a/amxmodx/file.cpp +++ b/amxmodx/file.cpp @@ -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 }