[escher] Fix bug in textfield

Change-Id: I86df7fb5c95c0a030018b332ee5dfa63c66b4127
This commit is contained in:
Émilie Feral
2017-02-09 09:24:22 +01:00
parent 0960fab1a5
commit 0d41808d90

View File

@@ -163,7 +163,9 @@ void TextField::insertTextAtLocation(const char * text, int location) {
m_draftTextBuffer[k+textSize] = m_draftTextBuffer[k];
}
strlcpy(&m_draftTextBuffer[location], text, textSize);
m_draftTextBuffer[location+textSize-1] = text[textSize-1];
if (location+textSize > 0) {
m_draftTextBuffer[location+textSize-1] = text[textSize-1];
}
m_currentTextLength += textSize;
reload();
}