aboutsummaryrefslogtreecommitdiff
path: root/src/intlGUIEditBox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/intlGUIEditBox.cpp')
-rw-r--r--src/intlGUIEditBox.cpp4
1 files 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);