diff --git a/core/smn_filesystem.cpp b/core/smn_filesystem.cpp index 5c6c9f6e..9cad4d6c 100644 --- a/core/smn_filesystem.cpp +++ b/core/smn_filesystem.cpp @@ -194,7 +194,10 @@ static cell_t sm_ReadFileLine(IPluginContext *pContext, const cell_t *params) return 0; } - fgets(buf, params[3], pFile); + if (fgets(buf, params[3], pFile) == NULL) + { + return 0; + } return 1; }