From 48e795005d6145ab3a09159fbaa992802b657cee Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sat, 20 Feb 2021 12:55:42 +0100 Subject: 9boot: handle automatic length for 64-bit values in hexfmt() for framebuffer address (thanks Michael Forney) --- sys/src/boot/efi/sub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/src/boot/efi/sub.c b/sys/src/boot/efi/sub.c index 798e5a92f..8e73c361f 100644 --- a/sys/src/boot/efi/sub.c +++ b/sys/src/boot/efi/sub.c @@ -306,8 +306,8 @@ numfmt(char *s, ulong b, ulong i, ulong a) char* hexfmt(char *s, int i, uvlong a) { - if(i > 8){ - s = numfmt(s, 16, i-8, a>>32); + if(i > 8 || i == 0 && (a>>32) != 0){ + s = numfmt(s, 16, i ? i-8 : 0, a>>32); i = 8; } return numfmt(s, 16, i, a); -- cgit v1.2.3