From f7b3950cd40920fb37cfdda955a6703aaa31ff02 Mon Sep 17 00:00:00 2001 From: Benau Date: Thu, 15 Mar 2018 10:39:02 +0800 Subject: [PATCH] Fix cursor stop working after pressing enter --- src/guiengine/widgets/CGUIEditBox.cpp | 2 +- src/guiengine/widgets/text_box_widget.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/guiengine/widgets/CGUIEditBox.cpp b/src/guiengine/widgets/CGUIEditBox.cpp index a5e2ccb27..013bff741 100644 --- a/src/guiengine/widgets/CGUIEditBox.cpp +++ b/src/guiengine/widgets/CGUIEditBox.cpp @@ -819,7 +819,7 @@ bool CGUIEditBox::processKey(const SEvent& event) calculateScrollPos(); - if (CursorPos > Text.size()) + if (CursorPos > (s32)Text.size()) CursorPos = Text.size(); #if defined(_IRR_COMPILE_WITH_WINDOWS_DEVICE_) diff --git a/src/guiengine/widgets/text_box_widget.cpp b/src/guiengine/widgets/text_box_widget.cpp index e04819027..02d32c4ea 100644 --- a/src/guiengine/widgets/text_box_widget.cpp +++ b/src/guiengine/widgets/text_box_widget.cpp @@ -68,7 +68,10 @@ public: for (unsigned int n=0; n