summaryrefslogtreecommitdiff
path: root/src/table/misc_settings.ini
diff options
context:
space:
mode:
Diffstat (limited to 'src/table/misc_settings.ini')
-rw-r--r--src/table/misc_settings.ini4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/table/misc_settings.ini b/src/table/misc_settings.ini
index 3add5148f..9d2f76cc0 100644
--- a/src/table/misc_settings.ini
+++ b/src/table/misc_settings.ini
@@ -26,6 +26,10 @@ SDTG_BOOL = SDTG_BOOL($name, $flags, $guiflags, $var, $def,
SDTG_VAR = SDTG_VAR($name, $type, $flags, $guiflags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extra, $startup),
SDTG_END = SDTG_END()
+[validation]
+SDTG_VAR = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
+SDTG_OMANY = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
+
[defaults]
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
guiflags = SGF_NONE