Fix input regression introduced by a4a377ecad

Fix #5776
master
Loic Blot 2017-05-20 10:12:54 +02:00
parent d176dabeb4
commit 1469424075
No known key found for this signature in database
GPG Key ID: EFAA458E8C153987
1 changed files with 2 additions and 2 deletions

View File

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