diff options
author | Sebastian Reichel <sre@ring0.de> | 2012-06-07 19:25:06 +0200 |
---|---|---|
committer | Sebastian Reichel <sre@ring0.de> | 2012-06-07 19:25:06 +0200 |
commit | c4f93a4baab4c37abfac10593e7c01059c2c878a (patch) | |
tree | 8cf939d300940f1ff4e7705b1c7c8531c250320a | |
parent | 0e6cd749d027b25abb4b30ff8d2bfb1764875d8a (diff) | |
download | serial-barcode-scanner-c4f93a4baab4c37abfac10593e7c01059c2c878a.tar.bz2 |
STOCK barcode also has checksum
-rw-r--r-- | device.vala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/device.vala b/device.vala index 3778582..b27f73d 100644 --- a/device.vala +++ b/device.vala @@ -137,7 +137,7 @@ public class Device { ret = gio.read_line(out msg, out len, out term_char); msg = msg[0:(long)term_char]; - if(msg.has_prefix("USER ") || msg.has_prefix("AMOUNT ")) { + if(msg.has_prefix("USER ") || msg.has_prefix("STOCK") || msg.has_prefix("AMOUNT ")) { if(!check_code39_checksum(msg)) received_barcode("SCANNER RETURNED INCORRECT DATA"); else {/* remove checksum */ |