Fix input regression introduced by a4a377ecad6f1732cc54e7ac329fdef9949f9bf7

Fix #5776
master
Loic Blot 2017-05-20 10:12:54 +02:00
parent 605df12892
commit 4f80ff7361
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);