diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-03-07 06:09:50 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-03-07 06:09:50 -0800 |
commit | a3b0877584b9154bf5a5e2218e8ad07ea3c44ff3 (patch) | |
tree | c5fddf7e276b7f379dca5eeeca7ff11893ce55f7 | |
parent | ede02a9fa6454d7462901f9997de1f9bef071379 (diff) | |
download | txr-a3b0877584b9154bf5a5e2218e8ad07ea3c44ff3.tar.gz txr-a3b0877584b9154bf5a5e2218e8ad07ea3c44ff3.tar.bz2 txr-a3b0877584b9154bf5a5e2218e8ad07ea3c44ff3.zip |
Bugfix: incorrect error string from stdio streams.
* stream.c (errno_to_string): Fix wrong test; it is a nil
value of err which is the "no error" case, not non-nil.
Due to this bug, any non-numeric error condition will
be reported as "no error", including the case t ("eof").
-rw-r--r-- | stream.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -412,7 +412,7 @@ val errno_to_string(val err) return lit("unspecified error"); else if (is_num(err)) return string_utf8(strerror(c_num(err))); - else if (err) + else if (!err) return lit("no error"); else if (err == t) return lit("eof"); |