From 1469424075affce7c27bb44e5a5cbd51485e44b2 Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Sat, 20 May 2017 10:12:54 +0200 Subject: [PATCH] Fix input regression introduced by a4a377ecad6f1732cc54e7ac329fdef9949f9bf7 Fix #5776 --- src/intlGUIEditBox.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.25.1