diff options
-rw-r--r-- | src/lib_io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib_io.c b/src/lib_io.c index f4888c1c..7a59cc4f 100644 --- a/src/lib_io.c +++ b/src/lib_io.c | |||
@@ -354,7 +354,7 @@ LJLIB_CF(io_method_lines) | |||
354 | LJLIB_CF(io_method___gc) | 354 | LJLIB_CF(io_method___gc) |
355 | { | 355 | { |
356 | IOFileUD *iof = io_tofilep(L); | 356 | IOFileUD *iof = io_tofilep(L); |
357 | if (iof->fp != NULL) | 357 | if (iof->fp != NULL && (iof->type & IOFILE_TYPE_MASK) != IOFILE_TYPE_STDF) |
358 | io_file_close(L, iof); | 358 | io_file_close(L, iof); |
359 | return 0; | 359 | return 0; |
360 | } | 360 | } |