changeset 2009:3d40a6767a4e

Oops, fix hexadecimal value parsing.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 07 Jul 2018 22:20:28 +0300
parents 172bed2945d2
children 09d548b08150
files src/dmlib.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/dmlib.c	Sat Jul 07 03:01:08 2018 +0300
+++ b/src/dmlib.c	Sat Jul 07 22:20:28 2018 +0300
@@ -182,13 +182,13 @@
             if (ch >= 'A' && ch <= 'F')
             {
                 *value <<= 4;
-                *value |= ch - 'A';
+                *value |= ch - 'A' + 10;
             }
             else
             if (ch >= 'a' && ch <= 'f')
             {
                 *value <<= 4;
-                *value |= ch - 'a';
+                *value |= ch - 'a' + 10;
             }
             else
                 return FALSE;