[Remove] Cleaned up an additional lua_remove() call.

This commit is contained in:
Allanis 2014-03-18 15:17:07 +00:00
parent 1fcc6be891
commit 770bad9ecc

View File

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