summaryrefslogtreecommitdiff
path: root/lib/xmltok_impl.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/xmltok_impl.c')
-rw-r--r--lib/xmltok_impl.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/xmltok_impl.c b/lib/xmltok_impl.c
index b71410d..16dfb85 100644
--- a/lib/xmltok_impl.c
+++ b/lib/xmltok_impl.c
@@ -1744,12 +1744,10 @@ PREFIX(updatePosition)(const ENCODING *enc,
const char *end,
POSITION *pos)
{
- while (ptr != end) {
+ while (ptr < end) {
switch (BYTE_TYPE(enc, ptr)) {
#define LEAD_CASE(n) \
case BT_LEAD ## n: \
- if (end - ptr < n) \
- return; \
ptr += n; \
break;
LEAD_CASE(2) LEAD_CASE(3) LEAD_CASE(4)