aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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;