changeset 507:8bb0817210a0

Fix th_get_hex_triplet() some more ..
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 26 Dec 2019 08:05:37 +0200
parents 2a9fdd851fb9
children fe5e7bf704e5
files th_string.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/th_string.c	Thu Dec 26 06:37:21 2019 +0200
+++ b/th_string.c	Thu Dec 26 08:05:37 2019 +0200
@@ -984,7 +984,7 @@
     int len;
     *value = 0;
 
-    for (len = 0; *p && len < 6 * 2; p++, len++)
+    for (len = 0; *p && len < 4 * 2; p++, len++)
     {
         if (*p >= '0' && *p <= '9')
         {
@@ -1007,7 +1007,7 @@
             return FALSE;
     }
 
-    return (len == 6 * 2);
+    return (len >= 3 * 2 && len <= 4 * 2);
 }