From eef62c82a2e58700fc1216b0b8c03e421bc77995 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Blot?= Date: Sat, 30 Jun 2018 17:11:38 +0200 Subject: Modernize lua read (part 2 & 3): C++ templating assurance (#7410) * Modernize lua read (part 2 & 3): C++ templating assurance Implement the boolean reader Implement the string reader Also remove unused & unimplemented script_error_handler Add a reader with default value --- src/script/lua_api/l_sound.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/script/lua_api/l_sound.cpp') diff --git a/src/script/lua_api/l_sound.cpp b/src/script/lua_api/l_sound.cpp index e7d517ce0..b86eda53e 100644 --- a/src/script/lua_api/l_sound.cpp +++ b/src/script/lua_api/l_sound.cpp @@ -28,7 +28,7 @@ int ModApiSound::l_sound_play(lua_State *L) { SimpleSoundSpec spec; read_soundspec(L, 1, spec); - bool looped = lua_toboolean(L, 2); + bool looped = readParam(L, 2); s32 handle = getGuiEngine(L)->playSound(spec, looped); -- cgit v1.2.3