]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix for potential divide by zero error
authorRobin Dunn <robin@alldunn.com>
Fri, 27 Dec 2002 21:16:16 +0000 (21:16 +0000)
committerRobin Dunn <robin@alldunn.com>
Fri, 27 Dec 2002 21:16:16 +0000 (21:16 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/src/stc/ScintillaWX.cpp
src/stc/ScintillaWX.cpp

index a45afda5a1b9d0eaa4b063ff863ac0a629d6b7aa..c9740849fd0ff978bfc9ae4823bfb83adf75a07a 100644 (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;
index a45afda5a1b9d0eaa4b063ff863ac0a629d6b7aa..c9740849fd0ff978bfc9ae4823bfb83adf75a07a 100644 (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;