i18n: Format large integers before the translation message - take 2

This is an additional fix which has been missing from the commit 837fe48de
(i18n: Format large integers before the translation message).

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
This commit is contained in:
Daniel Kiper 2021-04-14 17:18:06 +02:00
parent 837fe48deb
commit 66be067e61

View File

@ -126,10 +126,14 @@ grub_efi_allocate_pages_real (grub_efi_physical_address_t address,
/* Limit the memory access to less than 4GB for 32-bit platforms. */
if (address > GRUB_EFI_MAX_USABLE_ADDRESS)
{
char inv_addr[17], max_addr[17]; /* log16(2^64) = 16, plus NUL. */
grub_snprintf (inv_addr, sizeof (inv_addr) - 1, "%" PRIxGRUB_UINT64_T,
address);
grub_snprintf (max_addr, sizeof (max_addr) - 1, "%" PRIxGRUB_UINT64_T,
(grub_efi_uint64_t) GRUB_EFI_MAX_USABLE_ADDRESS);
grub_error (GRUB_ERR_BAD_ARGUMENT,
N_("invalid memory address (0x%" PRIxGRUB_UINT64_T
" > 0x%" PRIxGRUB_UINT64_T ")"),
address, (grub_efi_uint64_t) GRUB_EFI_MAX_USABLE_ADDRESS);
N_("invalid memory address (0x%s > 0x%s)"), inv_addr, max_addr);
return NULL;
}