Fixed logical issue with new iterators.
This commit is contained in:
parent
8ddc0105f9
commit
b342232378
|
@ -824,7 +824,7 @@ ctmbstr TY_(getNextPriorityAttr)( TidyDocImpl* doc, TidyIterator* iter )
|
||||||
assert( iter != NULL );
|
assert( iter != NULL );
|
||||||
index = (size_t)*iter;
|
index = (size_t)*iter;
|
||||||
|
|
||||||
if ( index > 0 && index < priorities->count )
|
if ( index > 0 && index <= priorities->count )
|
||||||
{
|
{
|
||||||
result = priorities->list[index-1];
|
result = priorities->list[index-1];
|
||||||
index++;
|
index++;
|
||||||
|
|
|
@ -1377,7 +1377,7 @@ ctmbstr TY_(getNextMutedMessage)( TidyDocImpl* doc, TidyIterator* iter )
|
||||||
assert( iter != NULL );
|
assert( iter != NULL );
|
||||||
index = (size_t)*iter;
|
index = (size_t)*iter;
|
||||||
|
|
||||||
if ( index > 0 && index < list->count )
|
if ( index > 0 && index <= list->count )
|
||||||
{
|
{
|
||||||
result = TY_(tidyErrorCodeAsKey)(list->list[index-1]);
|
result = TY_(tidyErrorCodeAsKey)(list->list[index-1]);
|
||||||
index++;
|
index++;
|
||||||
|
|
Loading…
Reference in a new issue