aboutsummaryrefslogtreecommitdiffstats
path: root/src/nmt
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2017-07-02 10:43:36 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2017-07-15 07:38:13 +0200
commit7af886c6005b6c3ea4459c6110bbb7984e688b1e (patch)
tree4cf11aacd3a6b51a019e1871b593c1c4dd6e424e /src/nmt
parent085ceb917308c7f447a22c1c81c96b0cf43e277d (diff)
NMT: Fixed NMT digit decoding
Diffstat (limited to 'src/nmt')
-rw-r--r--src/nmt/frame.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nmt/frame.c b/src/nmt/frame.c
index 1affa36..bde6e8d 100644
--- a/src/nmt/frame.c
+++ b/src/nmt/frame.c
@@ -92,9 +92,9 @@ uint64_t nmt_digits2value(const char *digits, int num)
value |= digit - '0';
else if (digit == '0')
value |= 10;
- else if (digit >= 'a' || digit == 'f')
+ else if (digit >= 'a' && digit <= 'f')
value |= digit - 'a' + 10;
- else if (digit >= 'A' || digit == 'F')
+ else if (digit >= 'A' && digit <= 'F')
value |= digit - 'A' + 10;
else
value |= 0;