diff options
author | Simon Howard | 2009-11-21 00:40:58 +0000 |
---|---|---|
committer | Simon Howard | 2009-11-21 00:40:58 +0000 |
commit | 892ad7c072a6717e8935053d7837a33974d0d824 (patch) | |
tree | 274b429a5459813a27db5b1ad3e5f0d19ac498e8 /setup | |
parent | 1dfad75870fa6b8e0a3aa41b3f9bb6ea260c9d9f (diff) | |
download | chocolate-doom-892ad7c072a6717e8935053d7837a33974d0d824.tar.gz chocolate-doom-892ad7c072a6717e8935053d7837a33974d0d824.tar.bz2 chocolate-doom-892ad7c072a6717e8935053d7837a33974d0d824.zip |
Apply configuration file invalid key setting fix to setup code.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1733
Diffstat (limited to 'setup')
-rw-r--r-- | setup/configfile.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/setup/configfile.c b/setup/configfile.c index 6d57a107..99ec2e03 100644 --- a/setup/configfile.c +++ b/setup/configfile.c @@ -532,7 +532,15 @@ 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; |