riched20 regression fix
Krzysztof Foltman
kfoltman at portal.onet.pl
Sat Mar 5 17:35:30 CST 2005
The original patch used to crash some installers because of division by
zero, detected by Marcus Meissner. This patch solves the problem
temporarily, until all the scrollbar/repainting-related code will
eventually get rewritten.
ChangeLog:
* added a check for empty scrollbar range
-------------- next part --------------
Index: dlls/riched20/paint.c
===================================================================
RCS file: /home/wine/wine/dlls/riched20/paint.c,v
retrieving revision 1.1
diff -u -r1.1 paint.c
--- dlls/riched20/paint.c 5 Mar 2005 11:19:14 -0000 1.1
+++ dlls/riched20/paint.c 5 Mar 2005 23:33:04 -0000
@@ -310,6 +310,7 @@
GetScrollInfo(hWnd, SB_VERT, &si);
if (ypos < 0) {
+ if (si.nMax<1) si.nMax = 1;
perc = 1.0*si.nPos/si.nMax;
ypos = perc*overflow;
}
More information about the wine-patches
mailing list