summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/luaengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/mame/luaengine.cpp')
-rw-r--r--src/frontend/mame/luaengine.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/frontend/mame/luaengine.cpp b/src/frontend/mame/luaengine.cpp
index 610b1947210..9d79d1f635d 100644
--- a/src/frontend/mame/luaengine.cpp
+++ b/src/frontend/mame/luaengine.cpp
@@ -828,7 +828,7 @@ void lua_engine::initialize()
[](emu_file &file, const char *path, u32 flags) { new (&file) emu_file(path, flags); },
[](emu_file &file, const char *mode) {
int flags = 0;
- for(int i = 0; i < 2; i++) // limit to three chars
+ for(int i = 0; i < 3 && mode[i]; i++) // limit to three chars
{
switch(mode[i])
{
@@ -847,7 +847,7 @@ void lua_engine::initialize()
},
[](emu_file &file, const char *path, const char* mode) {
int flags = 0;
- for(int i = 0; i < 2; i++) // limit to three chars
+ for(int i = 0; i < 3 && mode[i]; i++) // limit to three chars
{
switch(mode[i])
{
@@ -1587,8 +1587,8 @@ void lua_engine::initialize()
* input:code_name(code) - get code friendly name
* input:seq_from_tokens(tokens) - get input_seq for multiple space separated KEYCODE_* string tokens
* input:seq_pressed(seq) - get pressed state for input_seq
- * input:seq_to_token(seq) - get KEYCODE_* string tokens for seq
- * input:seq_to_name(seq) - get seq friendly name
+ * input:seq_to_tokens(seq) - get KEYCODE_* string tokens for seq
+ * input:seq_name(seq) - get seq friendly name
*/
sol().registry().new_usertype<input_manager>("input", "new", sol::no_constructor,