Fix for potential divide by zero error

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2002-12-27 21:16:16 +00:00
parent 762e199741
commit 91f580b235
2 changed files with 4 additions and 0 deletions

View File

@ -557,6 +557,8 @@ void ScintillaWX::DoMouseWheel(int rotation, int delta,
}
}
else { // otherwise just scroll the window
if ( !delta )
delta = 120;
wheelRotation += rotation;
lines = wheelRotation / delta;
wheelRotation -= lines * delta;

View File

@ -557,6 +557,8 @@ void ScintillaWX::DoMouseWheel(int rotation, int delta,
}
}
else { // otherwise just scroll the window
if ( !delta )
delta = 120;
wheelRotation += rotation;
lines = wheelRotation / delta;
wheelRotation -= lines * delta;