[FREELDR] Don't hardcode buffer size.

This commit is contained in:
Hermès Bélusca-Maïto 2021-11-19 02:14:11 +01:00
parent 5cad040726
commit 497fee1622
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
2 changed files with 2 additions and 2 deletions

View file

@ -356,7 +356,7 @@ UiDrawMenuItem(IN PUI_MENU_INFO MenuInfo,
if (MenuInfo->MenuItemList[MenuItemNumber] == NULL)
{
/* Make it a separator line and use menu colors */
memset(MenuLineText, 0, 80);
memset(MenuLineText, 0, sizeof(MenuLineText));
memset(MenuLineText, 0xC4, (MenuInfo->Right - MenuInfo->Left - 1));
Attribute = ATTR(UiMenuFgColor, UiMenuBgColor);
}

View file

@ -451,7 +451,7 @@ TuiDrawMenuItem(PUI_MENU_INFO MenuInfo,
//
// Make it a separator line and use menu colors
//
memset(MenuLineText, 0, 80);
memset(MenuLineText, 0, sizeof(MenuLineText));
memset(MenuLineText, 0xC4, (MenuInfo->Right - MenuInfo->Left - 1));
Attribute = ATTR(UiMenuFgColor, UiMenuBgColor);
}