Commit fc9be6a5 authored by Ulrich Czekalla's avatar Ulrich Czekalla Committed by Alexandre Julliard

Handle case where iterator range contains 0 elements.

parent 04869eb6
......@@ -1113,8 +1113,13 @@ static RANGE iterator_range(ITERATOR* i)
if (!i->ranges) return i->range;
range.lower = (*(RANGE*)DPA_GetPtr(i->ranges->hdpa, 0)).lower;
range.upper = (*(RANGE*)DPA_GetPtr(i->ranges->hdpa, DPA_GetPtrCount(i->ranges->hdpa) - 1)).upper;
if (DPA_GetPtrCount(i->ranges->hdpa) > 0)
{
range.lower = (*(RANGE*)DPA_GetPtr(i->ranges->hdpa, 0)).lower;
range.upper = (*(RANGE*)DPA_GetPtr(i->ranges->hdpa, DPA_GetPtrCount(i->ranges->hdpa) - 1)).upper;
}
else range.lower = range.upper = 0;
return range;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment