From 91f580b23511449bea4bc629c22d297b4eb01883 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 27 Dec 2002 21:16:16 +0000 Subject: [PATCH] Fix for potential divide by zero error git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/src/stc/ScintillaWX.cpp | 2 ++ src/stc/ScintillaWX.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/contrib/src/stc/ScintillaWX.cpp b/contrib/src/stc/ScintillaWX.cpp index a45afda5a1..c9740849fd 100644 --- a/contrib/src/stc/ScintillaWX.cpp +++ b/contrib/src/stc/ScintillaWX.cpp @@ -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; diff --git a/src/stc/ScintillaWX.cpp b/src/stc/ScintillaWX.cpp index a45afda5a1..c9740849fd 100644 --- a/src/stc/ScintillaWX.cpp +++ b/src/stc/ScintillaWX.cpp @@ -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; -- 2.47.2