shithub: choc

Download patch

ref: 892ad7c072a6717e8935053d7837a33974d0d824
parent: 1dfad75870fa6b8e0a3aa41b3f9bb6ea260c9d9f
author: Simon Howard <[email protected]>
date: Fri Nov 20 19:40:58 EST 2009

Apply configuration file invalid key setting fix to setup code.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1733

--- a/setup/configfile.c
+++ b/setup/configfile.c
@@ -532,7 +532,15 @@
 
                     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;