fixed fclose bug (NiLuJe)
This commit is contained in:
parent
a9cdb2b48e
commit
2d6c06b82f
|
@ -633,19 +633,16 @@ static cell AMX_NATIVE_CALL amx_feof(AMX *amx, cell *params)
|
|||
|
||||
static cell AMX_NATIVE_CALL amx_fclose(AMX *amx, cell *params)
|
||||
{
|
||||
cell *addr = get_amxaddr(amx, params[1]);
|
||||
if (*addr)
|
||||
{
|
||||
FILE *fp = (FILE *)*addr;
|
||||
FILE *fp = (FILE *)params[1];
|
||||
|
||||
if (!fp)
|
||||
return 1;
|
||||
|
||||
fclose(fp);
|
||||
*addr = 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static cell AMX_NATIVE_CALL amx_filesize(AMX *amx, cell *params)
|
||||
{
|
||||
int len;
|
||||
|
|
Loading…
Reference in New Issue
Block a user