summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/luaengine.cpp
diff options
context:
space:
mode:
author dankan1890 <mewuidev2@gmail.com>2016-01-29 00:43:18 +0100
committer dankan1890 <mewuidev2@gmail.com>2016-01-29 00:43:18 +0100
commit361d32d37ffbe133760fcbfa314f60ccd4a8e8a8 (patch)
tree31813d7d743784862112bd647ee6da3b1361158b /src/emu/luaengine.cpp
parentcb1d7fe7fc942677c6aae668e283073f08a11199 (diff)
Small code cleanup:
- corealloc.h: added macro definition for global_alloc (nothrow) memory allocation. - textbuf.cpp / wavwrite.cpp: removed pointless cast. - debugcmd.cpp / luaengine.cpp / render.cpp: avoid strlen calls in a loop. - diimage.cpp: simplified "device_image_interface::set_image_filename" function. - miscmenu.cpp / selgame.h / video.cpp(h): replaced int with bool where applicable. - ui.cpp: removed unused code.
Diffstat (limited to 'src/emu/luaengine.cpp')
-rw-r--r--src/emu/luaengine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/emu/luaengine.cpp b/src/emu/luaengine.cpp
index 733c99537c7..f1d12757ed7 100644
--- a/src/emu/luaengine.cpp
+++ b/src/emu/luaengine.cpp
@@ -1049,7 +1049,7 @@ void lua_engine::periodic_check()
osd_lock_acquire(lock);
if (msg.ready == 1) {
lua_settop(m_lua_state, 0);
- int status = luaL_loadbuffer(m_lua_state, msg.text.c_str(), strlen(msg.text.c_str()), "=stdin");
+ int status = luaL_loadbuffer(m_lua_state, msg.text.c_str(), msg.text.length(), "=stdin");
if (incomplete(status)==0) /* cannot try to add lines? */
{
if (status == LUA_OK) status = docall(0, LUA_MULTRET);