aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--utils/bin2hex.pl7
1 files changed, 5 insertions, 2 deletions
diff --git a/utils/bin2hex.pl b/utils/bin2hex.pl
index 0cb486e7..778b699e 100644
--- a/utils/bin2hex.pl
+++ b/utils/bin2hex.pl
@@ -26,12 +26,15 @@
##
## -----------------------------------------------------------------------
-eval { use bytes; }; eval { binmode STDIN; };
+eval { use bytes; };
+eval { binmode STDIN; };
$len = 0;
while ( read(STDIN,$ch,1) ) {
$cc = ord($ch);
- $len += printf ("%x", $cc);
+ $s = sprintf("%x", $cc);
+ print $s;
+ $len += length($s);
if ( $len > 72 ) {
print "\n";
$len = 0;