diff options
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r-- | src/gui/viewport.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index af2125cb5..33690ba39 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -577,8 +577,11 @@ void Viewport::walkByMouse(const MouseEvent &event) int dy = 0; if (x2 > y2) { - if (y2 && x2 / y2 / wh > diff) + if (y2 && static_cast<float>(x2) / static_cast<float>(y2) + / wh > diff) + { y = 0; + } } else { |