From 2f76cbe15c765650097db5c5958bbac1552a15d0 Mon Sep 17 00:00:00 2001 From: David Capello Date: Fri, 23 Nov 2018 16:07:42 -0300 Subject: [PATCH] lua: Fix Range_contains() when we ask for the first frame (which is doc::frame_t=0 internally) --- src/app/script/range_class.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/script/range_class.cpp b/src/app/script/range_class.cpp index aa5cf4282..587c5a312 100644 --- a/src/app/script/range_class.cpp +++ b/src/app/script/range_class.cpp @@ -96,7 +96,8 @@ int Range_contains(lua_State* L) else if (Cel* cel = may_get_docobj(L, 2)) { result = obj->contains(cel); } - else if (frame_t frame = get_frame_number_from_arg(L, 2)) { + else { + frame_t frame = get_frame_number_from_arg(L, 2); result = obj->contains(frame); } lua_pushboolean(L, result);