From 6fa41cdf1874688096d0d489a22d23f69a13fdc7 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Wed, 30 Dec 2020 19:52:00 -0500 Subject: Print octal for 8 bits in bit --- bin/bit.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/bit.y b/bin/bit.y index 33347ff5..0d0f4933 100644 --- a/bin/bit.y +++ b/bin/bit.y @@ -174,7 +174,7 @@ int main(void) { for (int i = 0; i < 8; ++i) { bin[i] = '0' + (result >> (7 - i) & 1); } - printf(" 0b%s", bin); + printf(" %#"PRIo64" 0b%s", result, bin); } if (result < 128 && isprint(result)) { -- cgit 1.4.1