mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 14:25:38 +03:00
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)
|
static cell AMX_NATIVE_CALL amx_fclose(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
cell *addr = get_amxaddr(amx, params[1]);
|
FILE *fp = (FILE *)params[1];
|
||||||
if (*addr)
|
|
||||||
{
|
if (!fp)
|
||||||
FILE *fp = (FILE *)*addr;
|
return 1;
|
||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
*addr = 0;
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL amx_filesize(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL amx_filesize(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
|
Loading…
Reference in New Issue
Block a user