summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/settings.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
index 648c4c2fa..54509ac20 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -1628,7 +1628,12 @@ void IConsoleSetSetting(const char *name, const char *value)
uint32 val;
extern bool GetArgumentInteger(uint32 *value, const char *arg);
success = GetArgumentInteger(&val, value);
- if (success) success = SetSettingValue(index, val);
+ if (!success) {
+ IConsolePrintF(CC_ERROR, "'%s' is not an integer.", value);
+ return;
+ }
+
+ success = SetSettingValue(index, val);
}
if (!success) {