diff options
author | 2007-08-09 01:41:49 -0400 | |
---|---|---|
committer | 2007-08-09 01:41:49 -0400 | |
commit | 054bcbd76ce2a7f0d8be52df613bf6af3f14634c (patch) | |
tree | 6084cefff1661d2341e8b798d307e268f0bc6fa7 /src/lua_interface.c | |
parent | c043c2e6211fc6ccd8becf3b6cf597ee1ad052fb (diff) | |
download | textadept-054bcbd76ce2a7f0d8be52df613bf6af3f14634c.tar.gz textadept-054bcbd76ce2a7f0d8be52df613bf6af3f14634c.zip |
tLENGTH and tSTRINGRESULT parameters are handled properly; src/lua_interface.c
If p1_type == tLENGTH and p2_type == tSTRINGRESULT, both parameters can be
ignored because p1_type is filled with the length of p2_type, which is not
needed.
Diffstat (limited to 'src/lua_interface.c')
-rw-r--r-- | src/lua_interface.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lua_interface.c b/src/lua_interface.c index 62678c96..8553a36a 100644 --- a/src/lua_interface.c +++ b/src/lua_interface.c @@ -605,7 +605,7 @@ LF l_call_scintilla(LS *lua, ScintillaObject *sci, int msg, params_needed = 0; } else if (p2_type == tSTRINGRESULT) { string_return = true; - params_needed = 1; + params_needed = p1_type == tLENGTH ? 0 : 1; } if (params_needed > 0) params[0] = l_toscintillaparam(lua, p1_type, arg); if (params_needed > 1) params[1] = l_toscintillaparam(lua, p2_type, arg); |