diff options
author | 2010-05-24 15:52:00 -0400 | |
---|---|---|
committer | 2010-05-24 15:52:00 -0400 | |
commit | d553c7fe7cb5578642dfca565d094e16608b5af4 (patch) | |
tree | 119f2a343abbe13bf09f6e1c105c337013f8e05b /src | |
parent | 10c248eac52403f11fd7bcdf8811ff479122ebd8 (diff) | |
download | textadept-d553c7fe7cb5578642dfca565d094e16608b5af4.tar.gz textadept-d553c7fe7cb5578642dfca565d094e16608b5af4.zip |
Fixed buffer:text_range() argcheck; src/lua_interface.c
Diffstat (limited to 'src')
-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 c049fed8..9bc8aff9 100644 --- a/src/lua_interface.c +++ b/src/lua_interface.c @@ -1027,7 +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"); + 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; |