listview
Dimitrie O. Paun
dpaun at rogers.com
Tue May 11 09:19:36 CDT 2004
> From: Ulrich Czekalla <ulrich.czekalla at utoronto.ca>
> Ulrich Czekalla <ulrich at 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.
-------------- next part --------------
Index: dlls/comctl32/listview.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/listview.c,v
retrieving revision 1.387
diff -u -w -r1.387 listview.c
--- dlls/comctl32/listview.c 21 Apr 2004 22:25:04 -0000 1.387
+++ dlls/comctl32/listview.c 11 May 2004 04:34:02 -0000
@@ -1109,12 +1109,16 @@
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;
+ }
+
return range;
}
More information about the wine-devel
mailing list