small write_file fix

This commit is contained in:
Pavol Marko 2004-02-15 17:55:27 +00:00
parent 476c788c51
commit 35c9b8a4b1
2 changed files with 1 additions and 0 deletions

View File

@ -188,6 +188,7 @@ static cell AMX_NATIVE_CALL write_file(AMX *amx, cell *params) /* 3 param */
// now rewrite because file can be now smaller... // now rewrite because file can be now smaller...
if ( (pFile = fopen(sFile,"w")) == NULL ){ if ( (pFile = fopen(sFile,"w")) == NULL ){
amx_RaiseError(amx,AMX_ERR_NATIVE); amx_RaiseError(amx,AMX_ERR_NATIVE);
fclose(pTemp);
return 0; return 0;
} }