diff --git a/src/conf.c b/src/conf.c index 1e3dbd8..fb30d99 100644 --- a/src/conf.c +++ b/src/conf.c @@ -278,10 +278,10 @@ int conf_loadConfig(const char* file) { if((key != SDLK_UNKNOWN) && (str != NULL)) { /* Then the keybind is valid. Get the type. */ - if(strcmp(str, "null")==0) type = KEYBIND_NULL; - else if(strcmp(str, "keyboard")==0) type = KEYBIND_KEYBOARD; - else if(strcmp(str, "jaxis")==0) type = KEYBIND_JAXIS; - else if(strcmp(str, "jbutton")==0) type = KEYBIND_JBUTTON; + if(strcmp(str, "null") ==0) type = KEYBIND_NULL; + else if(strcmp(str, "keyboard") ==0) type = KEYBIND_KEYBOARD; + else if(strcmp(str, "jaxis") ==0) type = KEYBIND_JAXIS; + else if(strcmp(str, "jbutton") ==0) type = KEYBIND_JBUTTON; else { WARN("Unknown keybinding of type %s", str); continue; @@ -307,13 +307,13 @@ int conf_loadConfig(const char* file) { /* Set the keybind. */ input_setKeybind((char*)keybindNames[i], type, key, m, reverse); - } else + } else { WARN("Malformed keybind in %s", file); + } /* Clean up after table crap. */ lua_remove(L,-1); } - lua_remove(L, -1); } } else { /* Failed to load the config file.. */