From a1875da85abb3558c6ca7262fb1e719c5bf49fd9 Mon Sep 17 00:00:00 2001 From: Daniel Kochmanski Date: Sun, 23 Sep 2018 15:08:07 +0200 Subject: [PATCH] ansi: return NIL for file-string-length if can't determine it. Previously we returned error for streams which are not file streams. We could try to loose this test for ECL_ANSI_STREAM_P, but that would require confirming, that all ECL's ANSI streams have string encoders defined. --- src/c/file.d | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/c/file.d b/src/c/file.d index ce4167baa..21f8a925a 100755 --- a/src/c/file.d +++ b/src/c/file.d @@ -4812,7 +4812,8 @@ cl_file_string_length(cl_object stream, cl_object string) } } unlikely_if (!ECL_FILE_STREAM_P(stream)) { - not_a_file_stream(stream); + /* Spec says, that if cannot be determined we return NIL. */ + return ECL_NIL; } switch (ecl_t_of(string)) { #ifdef ECL_UNICODE