summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/m_config.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/m_config.c b/src/m_config.c
index 73f0da2c..a2f3ac58 100644
--- a/src/m_config.c
+++ b/src/m_config.c
@@ -1237,7 +1237,14 @@ static void LoadDefaultCollection(default_collection_t *collection)
intparm = ParseIntParameter(strparm);
defaults[i].untranslated = intparm;
- intparm = scantokey[intparm];
+ if (intparm >= 0 && intparm < 128)
+ {
+ intparm = scantokey[intparm];
+ }
+ else
+ {
+ intparm = 0;
+ }
defaults[i].original_translated = intparm;
* (int *) def->location = intparm;