aboutsummaryrefslogtreecommitdiff
path: root/include/device_proto.h
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2016-10-17 22:04:20 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2016-10-19 16:35:22 +0200
commit62f48fa92db1be555a955328c6654a301cf6f7c8 (patch)
treefb0f1f425efc6ed4e1cea5b72597d82c85fdb5fa /include/device_proto.h
parentd9d010c43a1ea7a21b0bcc9e3175f9769afcc337 (diff)
downloadlibnitrokey-62f48fa92db1be555a955328c6654a301cf6f7c8.tar.gz
libnitrokey-62f48fa92db1be555a955328c6654a301cf6f7c8.tar.bz2
Make packet valid when its crc is not equal 0
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'include/device_proto.h')
-rw-r--r--include/device_proto.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/device_proto.h b/include/device_proto.h
index 6e99eaa..ff8bb67 100644
--- a/include/device_proto.h
+++ b/include/device_proto.h
@@ -125,7 +125,7 @@ namespace nitrokey {
bool isValid() const {
// return !_zero && payload.isValid() && isCRCcorrect() &&
// command_id == (uint8_t)(cmd_id);
- return true;
+ return crc != 0;
}
operator std::string() const {