summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-01-16 08:03:23 -0500
committerSolomon Peachy <pizza@shaftnet.org>2020-01-16 08:04:05 -0500
commit255537996f4cc6c4b508625571d719d7b5dc1b76 (patch)
tree049d85b9d00fd40cd7a5fd89245915c678bf24be
parentc23fe56eaa776b0ca2706d6c38cc32104af405b4 (diff)
downloadselphy_print-255537996f4cc6c4b508625571d719d7b5dc1b76.tar.gz
selphy_print-255537996f4cc6c4b508625571d719d7b5dc1b76.tar.bz2
selphy_print-255537996f4cc6c4b508625571d719d7b5dc1b76.zip
common: Fix packed_bcd_to_uint32() computation.
-rw-r--r--backend_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/backend_common.c b/backend_common.c
index d074f2e..453c6f5 100644
--- a/backend_common.c
+++ b/backend_common.c
@@ -1674,7 +1674,7 @@ uint32_t packed_bcd_to_uint32(const char *in, int len)
while (len--) {
out *= 10;
- out += (*in >> 4);
+ out += ((*in >> 4) & 0xf);
out *= 10;
out += (*in & 0xf);
in++;