projects
/
Biblio-RFID.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c299948
)
don't try to decode tag without data
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 27 Jul 2010 14:46:13 +0000
(16:46 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 27 Jul 2010 14:46:13 +0000
(16:46 +0200)
lib/RFID/Serial/Decode/RFID501.pm
patch
|
blob
|
history
diff --git
a/lib/RFID/Serial/Decode/RFID501.pm
b/lib/RFID/Serial/Decode/RFID501.pm
index
38b821e
..
c0176f6
100644
(file)
--- a/
lib/RFID/Serial/Decode/RFID501.pm
+++ b/
lib/RFID/Serial/Decode/RFID501.pm
@@
-42,6
+42,8
@@
my $item_type = {
sub to_hash {
my ( $self, $data ) = @_;
+ return unless $data;
+
my ( $u1, $set_item, $u2, $type, $content, $br_lib, $custom ) = unpack('C4Z16Nl>',$data);
my $hash = {
u1 => $u1, # FIXME