projects
/
zc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4358c74
)
show unknown data in hex
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 29 Sep 2020 10:19:48 +0000
(12:19 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 29 Sep 2020 10:19:48 +0000
(12:19 +0200)
unpack.pl
patch
|
blob
|
history
diff --git
a/unpack.pl
b/unpack.pl
index
66f4c33
..
9ffb3ec
100755
(executable)
--- a/
unpack.pl
+++ b/
unpack.pl
@@
-74,7
+74,7
@@
while ( $data ) {
my $data_id = unpack( 'C', substr($data,0,1) );
if ( ! exists( $protocol->{$data_id}->{description} ) ) {
my $len = unpack('C', substr($data,1,1));
- printf "ERROR: no description for data_id %d 0x%2x len %d
SKIPPING!\n", $data_id, $data_id, $len
;
+ printf "ERROR: no description for data_id %d 0x%2x len %d
[%s] SKIPPING!\n", $data_id, $data_id, $len, unpack('H*', substr($data,2,$len))
;
$data = substr($data,2 + $len);
next;
}