From 2e0a70f269b34ec226d87e285f61fc099bbfaf28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Wed, 16 May 2018 14:31:42 +0200 Subject: [PATCH] [escher] Fix bug in text field: casting a unsigned char to signed char give negative values above 127... --- escher/src/text_field.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/escher/src/text_field.cpp b/escher/src/text_field.cpp index ae3ff78c5..d7e2b4754 100644 --- a/escher/src/text_field.cpp +++ b/escher/src/text_field.cpp @@ -123,7 +123,7 @@ bool TextField::ContentView::removeChar() { if( m_horizontalAlignment == 0.0f) { reloadRectFromCursorPosition(cursorLocation()); } - for (int k = cursorLocation(); k < (signed char)m_currentDraftTextLength; k ++) { + for (size_t k = cursorLocation(); k < m_currentDraftTextLength; k++) { m_draftTextBuffer[k] = m_draftTextBuffer[k+1]; } m_draftTextBuffer[m_currentDraftTextLength] = 0;