]> git.lizzy.rs Git - plan9front.git/commitdiff
9boot: handle automatic length for 64-bit values in hexfmt() for framebuffer address...
authorcinap_lenrek <cinap_lenrek@felloff.net>
Sat, 20 Feb 2021 11:55:42 +0000 (12:55 +0100)
committercinap_lenrek <cinap_lenrek@felloff.net>
Sat, 20 Feb 2021 11:55:42 +0000 (12:55 +0100)
sys/src/boot/efi/sub.c

index 798e5a92f082f1c2970036400847e6ca6e39215e..8e73c361fca98db30a9641c1f1336722aa7a329f 100644 (file)
@@ -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);