summaryrefslogtreecommitdiff
path: root/testing/misc_tools.c
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2018-02-23 17:11:00 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-03-16 01:57:26 +0000
commitaa050954195f6323775ed68f4262edf2341c6953 (patch)
tree0b2f53b23b97dc1e90f798ae97321a727c413462 /testing/misc_tools.c
parent78d5b74dcee1208efe19dd115006034501c4380f (diff)
Remove the use of the 'hh' format specifier.
It's not supported in mingw. See https://github.com/TokTok/c-toxcore/issues/786.
Diffstat (limited to 'testing/misc_tools.c')
-rw-r--r--testing/misc_tools.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/testing/misc_tools.c b/testing/misc_tools.c
index 3a6a3333..9b0d9956 100644
--- a/testing/misc_tools.c
+++ b/testing/misc_tools.c
@@ -64,7 +64,9 @@ uint8_t *hex_string_to_bin(const char *hex_string)
64 const char *pos = hex_string; 64 const char *pos = hex_string;
65 65
66 for (i = 0; i < len; ++i, pos += 2) { 66 for (i = 0; i < len; ++i, pos += 2) {
67 sscanf(pos, "%2hhx", &ret[i]); 67 unsigned int val;
68 sscanf(pos, "%02x", &val);
69 ret[i] = val;
68 } 70 }
69 71
70 return ret; 72 return ret;