summaryrefslogtreecommitdiff
path: root/other/bootstrap_daemon
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 /other/bootstrap_daemon
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 'other/bootstrap_daemon')
-rw-r--r--other/bootstrap_daemon/src/config.c4
-rw-r--r--other/bootstrap_daemon/src/tox-bootstrapd.c2
2 files changed, 4 insertions, 2 deletions
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)
316 size_t i; 316 size_t i;
317 317
318 for (i = 0; i < len; ++i, pos += 2) { 318 for (i = 0; i < len; ++i, pos += 2) {
319 sscanf(pos, "%2hhx", &ret[i]); 319 unsigned int val;
320 sscanf(pos, "%02x", &val);
321 ret[i] = val;
320 } 322 }
321 323
322 return ret; 324 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)
109 size_t i; 109 size_t i;
110 110
111 for (i = 0; i < CRYPTO_PUBLIC_KEY_SIZE; i++) { 111 for (i = 0; i < CRYPTO_PUBLIC_KEY_SIZE; i++) {
112 index += sprintf(buffer + index, "%02hhX", public_key[i]); 112 index += sprintf(buffer + index, "%02X", public_key[i]);
113 } 113 }
114 114
115 log_write(LOG_LEVEL_INFO, "Public Key: %s\n", buffer); 115 log_write(LOG_LEVEL_INFO, "Public Key: %s\n", buffer);