Merge pull request #7782 from orbea/format

Fix gcc -Wformat-truncation= warning.
This commit is contained in:
Twinaphex 2018-12-20 20:49:37 +01:00 committed by GitHub
commit 3bd1c3fa6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3438,7 +3438,7 @@ static int menu_displaylist_parse_options_remappings(
if (string_is_equal(settings->arrays.menu_driver, "rgui") && (max_users > 1))
{
snprintf(desc_label, sizeof(desc_label),
"%s [%s %u]", descriptor, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_USER), p + 1);
"%.5s [%s %u]", descriptor, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_USER), p + 1);
strlcpy(descriptor, desc_label, sizeof(descriptor));
}