diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2008-11-09 13:10:39 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2008-11-09 13:10:39 +0000 |
commit | b8e6c0d8ca30ebb087cf380df8f2ff2f367d4f06 (patch) | |
tree | 71db1abe3500dd4b51956ef64aabfca733aed4f0 /src/input/inputstream.c | |
parent | fc80fc27bf89226b96bdc6ddbe1847c3908ea6a2 (diff) | |
download | libparserutils-b8e6c0d8ca30ebb087cf380df8f2ff2f367d4f06.tar.gz libparserutils-b8e6c0d8ca30ebb087cf380df8f2ff2f367d4f06.tar.bz2 |
What to do with errors when reading from the buffer?
svn path=/trunk/libparserutils/; revision=5658
Diffstat (limited to 'src/input/inputstream.c')
-rw-r--r-- | src/input/inputstream.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; |