From: simon Date: Fri, 16 Sep 2005 16:52:26 +0000 (+0000) Subject: Bring utf8.c's internal tests up to date in the (somewhat belated) X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/charset/commitdiff_plain/7804475c3f05dfeb234d7a3e7578a2db2c5562c8 Bring utf8.c's internal tests up to date in the (somewhat belated) wake of r3713. git-svn-id: svn://svn.tartarus.org/sgt/charset@6314 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/utf8.c b/utf8.c index 3c99cb2..de2a62e 100644 --- a/utf8.c +++ b/utf8.c @@ -297,8 +297,10 @@ void utf8_write_test(int line, const long *input, int inlen, ...) state.s0 = 0; p = str; - for (i = 0; i < inlen; i++) - write_utf8(NULL, input[i], &state, utf8_emit, &p); + for (i = 0; i < inlen; i++) { + if (!write_utf8(NULL, input[i], &state, utf8_emit, &p)) + utf8_emit(&p, ERROR); + } va_start(ap, inlen); l = 0;