From: Loic Blot Date: Sat, 20 May 2017 08:12:54 +0000 (+0200) Subject: Fix input regression introduced by a4a377ecad6f1732cc54e7ac329fdef9949f9bf7 X-Git-Tag: 0.4.16~100 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1469424;p=oweals%2Fminetest.git Fix input regression introduced by a4a377ecad6f1732cc54e7ac329fdef9949f9bf7 Fix #5776 --- diff --git a/src/intlGUIEditBox.cpp b/src/intlGUIEditBox.cpp index 4cc2d746f..9884af003 100644 --- a/src/intlGUIEditBox.cpp +++ b/src/intlGUIEditBox.cpp @@ -1120,8 +1120,8 @@ s32 intlGUIEditBox::getCursorPos(s32 x, s32 y) if (x < CurrentTextRect.UpperLeftCorner.X) x = CurrentTextRect.UpperLeftCorner.X; - else if (x > CurrentTextRect.LowerRightCorner.X) - x = CurrentTextRect.LowerRightCorner.X; + else if (x > CurrentTextRect.LowerRightCorner.X + 1) + x = CurrentTextRect.LowerRightCorner.X + 1; s32 idx = font->getCharacterFromPos(Text.c_str(), x - CurrentTextRect.UpperLeftCorner.X);