From d553c7fe7cb5578642dfca565d094e16608b5af4 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Mon, 24 May 2010 15:52:00 -0400 Subject: Fixed buffer:text_range() argcheck; src/lua_interface.c --- src/lua_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3