From 0a5be7890d4f0fc11a5f487406f6a841e5bbea3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Wed, 1 May 2013 13:02:38 +0000 Subject: [PATCH] [INTERPRETER] * BUG: Don't wait for a stream to be ready for reading if the stream has no underlying file descriptor. git-svn-id: svn://localhost/gambas/trunk@5633 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- main/gbx/gbx_stream.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main/gbx/gbx_stream.c b/main/gbx/gbx_stream.c index a8e290cfa..986282880 100644 --- a/main/gbx/gbx_stream.c +++ b/main/gbx/gbx_stream.c @@ -74,7 +74,11 @@ void STREAM_exit(void) STREAM_close(&_temp_stream); } -#define wait_for_fd_ready_to_read(_fd) WATCH_process(_fd, -1, 0) +static void wait_for_fd_ready_to_read(fd) +{ + if (fd >= 0) + WATCH_process(fd, -1, 0); +} bool STREAM_in_archive(const char *path) {