summary refs log tree commit diff
path: root/bin
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-12-30 19:52:00 -0500
committerJune McEnroe <june@causal.agency>2020-12-30 19:52:00 -0500
commit21958b179aef07962421be47603059feeb67c393 (patch)
treea27a73b96ed5cd0e37d1df10034697e8773730c1 /bin
parentAdd unary & to bit (diff)
downloadsrc-21958b179aef07962421be47603059feeb67c393.tar.gz
src-21958b179aef07962421be47603059feeb67c393.zip
Print octal for 8 bits in bit
Diffstat (limited to '')
-rw-r--r--bin/bit.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/bit.y b/bin/bit.y
index 2b2ee27c..72056fc7 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)) {