summaryrefslogtreecommitdiff
path: root/src/settings_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings_gui.cpp')
-rw-r--r--src/settings_gui.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp
index d3d5dcbf6..e3253f460 100644
--- a/src/settings_gui.cpp
+++ b/src/settings_gui.cpp
@@ -437,7 +437,7 @@ static void GameDifficultyWndProc(Window *w, WindowEvent *e)
const GameSettingData *info;
int x, y;
uint btn, dis;
- int val;
+ int16 val;
// Don't allow clients to make any changes
if (_networking && !_network_server)
@@ -473,7 +473,8 @@ static void GameDifficultyWndProc(Window *w, WindowEvent *e)
SETBIT(_difficulty_click_b, btn);
} else {
// Decrease button clicked
- val = max(val - info->step, info->min);
+ val -= info->step;
+ val = max(val, info->min);
SETBIT(_difficulty_click_a, btn);
}