summaryrefslogtreecommitdiff
path: root/include/parserutils/input
diff options
context:
space:
mode:
authorJohn-Mark Bell <jmb@netsurf-browser.org>2014-01-13 02:00:25 +0000
committerJohn-Mark Bell <jmb@netsurf-browser.org>2014-01-13 02:00:25 +0000
commit93c721d6edc90e6f06eff8701824aa0d9ed6da16 (patch)
treec4484450cc2d3828c39ba17765b9af83d4e0aae6 /include/parserutils/input
parent3687f28df9aba82eb1476261a66f12db3f5eb049 (diff)
downloadlibparserutils-93c721d6edc90e6f06eff8701824aa0d9ed6da16.tar.gz
libparserutils-93c721d6edc90e6f06eff8701824aa0d9ed6da16.tar.bz2
Replace use of abort() with assertions.
Diffstat (limited to 'include/parserutils/input')
-rw-r--r--include/parserutils/input/inputstream.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/include/parserutils/input/inputstream.h b/include/parserutils/input/inputstream.h
index eb33307..df35c0d 100644
--- a/include/parserutils/input/inputstream.h
+++ b/include/parserutils/input/inputstream.h
@@ -139,9 +139,6 @@ static inline parserutils_error parserutils_inputstream_peek(
#undef IS_ASCII
- if (off != utf8_len && error != PARSERUTILS_NEEDDATA)
- abort();
-
return parserutils_inputstream_peek_slow(stream, offset, ptr, length);
}
@@ -163,7 +160,7 @@ static inline void parserutils_inputstream_advance(
#endif
if (bytes > stream->utf8->length - stream->cursor)
- abort();
+ bytes = stream->utf8->length - stream->cursor;
if (stream->cursor == stream->utf8->length)
return;