Gracefully handle unterminated UTF-8 sequences instead of hitting an `assert'.
authorLudovic Courtès <ludo@gnu.org>
Wed, 27 Apr 2011 18:34:08 +0000 (20:34 +0200)
committerLudovic Courtès <ludo@gnu.org>
Wed, 27 Apr 2011 18:34:08 +0000 (20:34 +0200)
commita42d79711b2366861cf4e6fa884eae709617121d
treeb2ca3b75961543fdae58e1fab35dfd72c004f40c
parentd84783a80c186b0b13e3aeb206384bb198bf41e6
Gracefully handle unterminated UTF-8 sequences instead of hitting an `assert'.

* libguile/ports.c (get_codepoint): Return EILSEQ when OUTPUT_SIZE == 0.

* test-suite/tests/ports.test ("string ports"): Add 2 tests for
  unterminated sequences.
libguile/ports.c
test-suite/tests/ports.test