From d77271ea793a3962f4a90e81e15931810ceb7d22 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Mon, 18 Oct 2010 18:34:12 -0400 Subject: Use luaL_checkstring for Scintilla string parameters; src/lua_interface.c --- src/lua_interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lua_interface.c b/src/lua_interface.c index 8a996e70..214f1f1c 100644 --- a/src/lua_interface.c +++ b/src/lua_interface.c @@ -576,7 +576,7 @@ GtkWidget *l_create_gtkmenu(lua_State *lua, GCallback callback, int submenu) { */ static long l_toscintillaparam(lua_State *lua, int type, int *arg_idx) { if (type == tSTRING) - return (long)lua_tostring(lua, (*arg_idx)++); + return (long)luaL_checkstring(lua, (*arg_idx)++); else if (type == tBOOL) return lua_toboolean(lua, (*arg_idx)++); else if (type == tKEYMOD) { @@ -723,7 +723,7 @@ static int l_call_scintilla(lua_State *lua, GtkWidget *editor, int msg, // Set the w and l parameters appropriately for Scintilla. if (p1_type == tLENGTH && p2_type == tSTRING) { params[0] = (long)lua_strlen(lua, arg); - params[1] = (long)lua_tostring(lua, arg); + params[1] = (long)luaL_checkstring(lua, arg); params_needed = 0; } else if (p2_type == tSTRINGRESULT) { string_return = TRUE; -- cgit v1.2.3