From aa050954195f6323775ed68f4262edf2341c6953 Mon Sep 17 00:00:00 2001 From: iphydf Date: Fri, 23 Feb 2018 17:11:00 +0000 Subject: Remove the use of the 'hh' format specifier. It's not supported in mingw. See https://github.com/TokTok/c-toxcore/issues/786. --- other/bootstrap_daemon/src/config.c | 4 +++- other/bootstrap_daemon/src/tox-bootstrapd.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'other/bootstrap_daemon/src') diff --git a/other/bootstrap_daemon/src/config.c b/other/bootstrap_daemon/src/config.c index 3f1592e6..a3c1f250 100644 --- a/other/bootstrap_daemon/src/config.c +++ b/other/bootstrap_daemon/src/config.c @@ -316,7 +316,9 @@ static uint8_t *hex_string_to_bin(const char *hex_string) size_t i; for (i = 0; i < len; ++i, pos += 2) { - sscanf(pos, "%2hhx", &ret[i]); + unsigned int val; + sscanf(pos, "%02x", &val); + ret[i] = val; } return ret; diff --git a/other/bootstrap_daemon/src/tox-bootstrapd.c b/other/bootstrap_daemon/src/tox-bootstrapd.c index bdf679c9..9f1a2db4 100644 --- a/other/bootstrap_daemon/src/tox-bootstrapd.c +++ b/other/bootstrap_daemon/src/tox-bootstrapd.c @@ -109,7 +109,7 @@ static void print_public_key(const uint8_t *public_key) size_t i; for (i = 0; i < CRYPTO_PUBLIC_KEY_SIZE; i++) { - index += sprintf(buffer + index, "%02hhX", public_key[i]); + index += sprintf(buffer + index, "%02X", public_key[i]); } log_write(LOG_LEVEL_INFO, "Public Key: %s\n", buffer); -- cgit v1.2.3