diff --git a/src/lua_baselib.c b/src/lua_baselib.c index 2b31e96f..ae746a1b 100644 --- a/src/lua_baselib.c +++ b/src/lua_baselib.c @@ -1906,6 +1906,8 @@ static int lib_sMusicInfo(lua_State *L) static int lib_sMusicExists(lua_State *L) { + boolean checkMIDI = lua_opttrueboolean(L, 2); + boolean checkDigi = lua_opttrueboolean(L, 3); #ifdef MUSICSLOT_COMPATIBILITY const char *music_name; UINT32 music_num; @@ -1933,8 +1935,6 @@ static int lib_sMusicExists(lua_State *L) #else const char *music_name = luaL_checkstring(L, 1); #endif - boolean checkMIDI = lua_opttrueboolean(L, 2); - boolean checkDigi = lua_opttrueboolean(L, 3); NOHUD lua_pushboolean(L, S_MusicExists(music_name, checkMIDI, checkDigi)); return 1;