From d02e14415b34212019316a3518fe2754c1a2470f Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Sat, 25 Apr 2009 10:59:05 -0500 Subject: [PATCH] another fix to FileFromStream --- C/iopreds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C/iopreds.c b/C/iopreds.c index 8adab0cbe..2f8f311c8 100644 --- a/C/iopreds.c +++ b/C/iopreds.c @@ -6107,9 +6107,9 @@ Yap_TermToString(Term t, char *s, unsigned int sz, int flags) FILE * Yap_FileDescriptorFromStream(Term t) { - int sno = CheckStream (t, Input_Stream_f, "get0/2"); + int sno = CheckStream (t, Input_Stream_f|Output_Stream_f, "FileDescriptorFromStream"); if (sno < 0) - return(FALSE); + return NULL; if (Stream[sno].status & (Null_Stream_f| InMemory_Stream_f| Socket_Stream_f|