summaryrefslogtreecommitdiff
path: root/src/table/gameopt_settings.ini
diff options
context:
space:
mode:
Diffstat (limited to 'src/table/gameopt_settings.ini')
-rw-r--r--src/table/gameopt_settings.ini7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/table/gameopt_settings.ini b/src/table/gameopt_settings.ini
index b85e11d9c..c4140f428 100644
--- a/src/table/gameopt_settings.ini
+++ b/src/table/gameopt_settings.ini
@@ -46,6 +46,13 @@ SDT_OMANY = SDT_OMANY($base, $var, $type, $flags, $guiflags, $def, $ma
SDT_VAR = SDT_VAR($base, $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat, $extra, $startup),
SDT_END = SDT_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");
+SDTC_OMANY = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
+SDT_OMANY = static_assert($max <= MAX_$type, "Maximum value for $base.$var exceeds storage size");
+SDT_VAR = static_assert($max <= MAX_$type, "Maximum value for $base.$var exceeds storage size");
+
[defaults]
flags = 0
guiflags = SGF_NONE