aboutsummaryrefslogtreecommitdiff
path: root/src/lua_interface.c
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2010-05-24 15:52:00 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2010-05-24 15:52:00 -0400
commitd553c7fe7cb5578642dfca565d094e16608b5af4 (patch)
tree119f2a343abbe13bf09f6e1c105c337013f8e05b /src/lua_interface.c
parent10c248eac52403f11fd7bcdf8811ff479122ebd8 (diff)
downloadtextadept-d553c7fe7cb5578642dfca565d094e16608b5af4.tar.gz
textadept-d553c7fe7cb5578642dfca565d094e16608b5af4.zip
Fixed buffer:text_range() argcheck; src/lua_interface.c
Diffstat (limited to 'src/lua_interface.c')
-rw-r--r--src/lua_interface.c2
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;