Fixed an error when closing file streams (the file can't be closed

because it is opened by the user).
This commit is contained in:
David Capello 2007-11-19 17:32:40 +00:00
parent fad42803e4
commit bdf06ed25d

View File

@ -208,8 +208,11 @@ int jstream_tell(JStream stream)
static void stream_file_close(JStream stream)
{
FILE *f = JSF->file;
if ((f != stdin) && (f != stdout) && (f != stderr))
fclose(f);
if ((f != stdin) && (f != stdout) && (f != stderr)) {
/* you must to close the file, here we can't do:
fclose(f);
*/
}
}
static bool stream_file_eof(JStream stream)