[escher] Fix buffer choice in TextField::glyphFrameAtPosition

This commit is contained in:
Léa Saviot
2019-01-31 10:56:17 +01:00
committed by Émilie Feral
parent 06269d5349
commit b1d18416e8
7 changed files with 14 additions and 12 deletions

View File

@@ -6,7 +6,7 @@
constexpr static int k_tabCharacterWidth = 4;
KDSize KDFont::stringSizeUntil(const char * text, const char * limit) const {
if (text == nullptr) {
if (text == nullptr || (limit != nullptr && text >= limit)) {
return KDSizeZero;
}
KDSize stringSize = KDSize(0, m_glyphSize.height());