Added a check for empty scrollbar range.

This commit is contained in:
Krzysztof Foltman 2005-03-07 10:59:53 +00:00 committed by Alexandre Julliard
parent d5749b454d
commit cdbab8bcfd
1 changed files with 1 additions and 0 deletions

View File

@ -310,6 +310,7 @@ void ME_UpdateScrollBar(ME_TextEditor *editor, int ypos)
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;
}