ref: 48e795005d6145ab3a09159fbaa992802b657cee
parent: 4bbb3b0b21edd81be37a0a6ad12c76a63d127bed
author: cinap_lenrek <[email protected]>
date: Sat Feb 20 07:55:42 EST 2021
9boot: handle automatic length for 64-bit values in hexfmt() for framebuffer address (thanks Michael Forney)
--- a/sys/src/boot/efi/sub.c
+++ b/sys/src/boot/efi/sub.c
@@ -306,8 +306,8 @@
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);