diff options
author | mitchell <70453897+667e-11@users.noreply.github.com> | 2010-04-02 16:08:21 -0400 |
---|---|---|
committer | mitchell <70453897+667e-11@users.noreply.github.com> | 2010-04-02 16:08:21 -0400 |
commit | 80a5769ed86611adf5390e126a4628a13dbcabbe (patch) | |
tree | 3c79ab053b8ba381c06b7272638d428491efc2d8 /src | |
parent | 4b9cf4b46f218be1cd8b2576c64b1273852f6758 (diff) |
Added argcheck for buffer:text_range(); src/lua_interface.c
Diffstat (limited to 'src')
-rw-r--r-- | src/lua_interface.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lua_interface.c b/src/lua_interface.c index 7752dcc5..c049fed8 100644 --- a/src/lua_interface.c +++ b/src/lua_interface.c @@ -1027,6 +1027,7 @@ static int l_cf_buffer_text_range(lua_State *lua) { struct Sci_TextRange tr; tr.chrg.cpMin = luaL_checkinteger(lua, 2); tr.chrg.cpMax = luaL_checkinteger(lua, 3); + luaL_argcheck(lua, tr.chrg.cpMin < tr.chrg.cpMax, 3, "start > end"); int length = tr.chrg.cpMax - tr.chrg.cpMin; char *text = malloc(length + 1); tr.lpstrText = text; |