From b8e6c0d8ca30ebb087cf380df8f2ff2f367d4f06 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 9 Nov 2008 13:10:39 +0000 Subject: What to do with errors when reading from the buffer? svn path=/trunk/libparserutils/; revision=5658 --- src/input/inputstream.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/input') diff --git a/src/input/inputstream.c b/src/input/inputstream.c index a4859be..5b2bd49 100644 --- a/src/input/inputstream.c +++ b/src/input/inputstream.c @@ -246,6 +246,9 @@ uintptr_t parserutils_inputstream_peek_slow(parserutils_inputstream *stream, /* Refill utf8 buffer from raw buffer */ error = parserutils_inputstream_refill_buffer(s); + /* We're currently converting all errors to OOD. Is this what we want? + * For example, the first time we fill the utf8 buffer, we could + * discover that we don't support the encoding of the raw data. */ if (error != PARSERUTILS_OK || s->public.cursor + offset == s->public.utf8->length) return PARSERUTILS_INPUTSTREAM_OOD; -- cgit v1.2.3