From b34223237896ab49b2d794d858ccb83c69c931a4 Mon Sep 17 00:00:00 2001 From: Jim Derry Date: Sun, 19 Nov 2017 11:02:13 -0500 Subject: [PATCH] Fixed logical issue with new iterators. --- src/attrs.c | 2 +- src/message.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/attrs.c b/src/attrs.c index 112f5d1..2aaf638 100644 --- a/src/attrs.c +++ b/src/attrs.c @@ -824,7 +824,7 @@ ctmbstr TY_(getNextPriorityAttr)( TidyDocImpl* doc, TidyIterator* iter ) assert( iter != NULL ); index = (size_t)*iter; - if ( index > 0 && index < priorities->count ) + if ( index > 0 && index <= priorities->count ) { result = priorities->list[index-1]; index++; diff --git a/src/message.c b/src/message.c index 1040e3a..eb097de 100644 --- a/src/message.c +++ b/src/message.c @@ -1377,7 +1377,7 @@ ctmbstr TY_(getNextMutedMessage)( TidyDocImpl* doc, TidyIterator* iter ) assert( iter != NULL ); index = (size_t)*iter; - if ( index > 0 && index < list->count ) + if ( index > 0 && index <= list->count ) { result = TY_(tidyErrorCodeAsKey)(list->list[index-1]); index++;