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);