summaryrefslogtreecommitdiff
path: root/t/lib-pack.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/lib-pack.sh')
-rw-r--r--t/lib-pack.sh10
1 files changed, 4 insertions, 6 deletions
diff --git a/t/lib-pack.sh b/t/lib-pack.sh
index 7e8685b..7509846 100644
--- a/t/lib-pack.sh
+++ b/t/lib-pack.sh
@@ -1,5 +1,3 @@
-#!/bin/sh
-#
# Support routines for hand-crafting weird or malicious packs.
#
# You can make a complete pack like:
@@ -12,10 +10,10 @@
# Print the big-endian 4-byte octal representation of $1
uint32_octal () {
n=$1
- printf '\%o' $(($n / 16777216)); n=$((n % 16777216))
- printf '\%o' $(($n / 65536)); n=$((n % 65536))
- printf '\%o' $(($n / 256)); n=$((n % 256))
- printf '\%o' $(($n ));
+ printf '\\%o' $(($n / 16777216)); n=$((n % 16777216))
+ printf '\\%o' $(($n / 65536)); n=$((n % 65536))
+ printf '\\%o' $(($n / 256)); n=$((n % 256))
+ printf '\\%o' $(($n ));
}
# Print the big-endian 4-byte binary representation of $1