diff --git a/src/preferences/keymap/KeyboardLayoutView.cpp b/src/preferences/keymap/KeyboardLayoutView.cpp index 2f26a370e8..102926068a 100644 --- a/src/preferences/keymap/KeyboardLayoutView.cpp +++ b/src/preferences/keymap/KeyboardLayoutView.cpp @@ -862,7 +862,7 @@ KeyboardLayoutView::_GetKeyLabel(const Key* key, char* text, size_t textSize, bool hasGlyphs; fBaseFont.GetHasGlyphs(bytes, 1, &hasGlyphs); if (hasGlyphs) - strlcpy(text, bytes, sizeof(text)); + strlcpy(text, bytes, textSize); } }