From 93c721d6edc90e6f06eff8701824aa0d9ed6da16 Mon Sep 17 00:00:00 2001 From: John-Mark Bell Date: Mon, 13 Jan 2014 02:00:25 +0000 Subject: Replace use of abort() with assertions. --- include/parserutils/input/inputstream.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'include') 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; -- cgit v1.2.3