From: Ulrich Czekalla ulrich.czekalla@utoronto.ca Ulrich Czekalla ulrich@codeweavers.com Handle case where iterator range contains 0 elements
I'm reading my mail through a webmail client (my gateway to the net died yesterday :(), so I might not see things properly, but shouldn't the content of the if be properly indented:
static RANGE iterator_range(ITERATOR* i) { - RANGE range; + RANGE range = { 0, 0 };
if (!i->ranges) return i->range;
+ 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;
+ } +