fixed a bug where ReadFileLine could return true when no data was read

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40644
This commit is contained in:
David Anderson 2007-03-16 22:38:24 +00:00
parent cbf1bbec0f
commit b89b932f15

View File

@ -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;
}