May 11, 2004
2:19 p.m.
> From: Ulrich Czekalla <ulrich.czekalla(a)utoronto.ca>
> Ulrich Czekalla <ulrich(a)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;
+ }
+
--
Dimi.
7990
Age (days ago)
7990
Last active (days ago)
0 comments
1 participants
participants (1)
-
Dimitrie O. Paun