Bring utf8.c's internal tests up to date in the (somewhat belated)
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 16 Sep 2005 16:52:26 +0000 (16:52 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 16 Sep 2005 16:52:26 +0000 (16:52 +0000)
wake of r3713.

git-svn-id: svn://svn.tartarus.org/sgt/charset@6314 cda61777-01e9-0310-a592-d414129be87e

utf8.c

diff --git a/utf8.c b/utf8.c
index 3c99cb2..de2a62e 100644 (file)
--- 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;