Fixed logical issue with new iterators.

This commit is contained in:
Jim Derry 2017-11-19 11:02:13 -05:00
parent 8ddc0105f9
commit b342232378
2 changed files with 2 additions and 2 deletions

View file

@ -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++;

View file

@ -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++;