1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-19 18:15:18 -07:00

Visual Studio doesn't have %zu

This commit is contained in:
Frank Denis 2015-10-17 21:32:25 +02:00
parent d667efde68
commit a2c8ff5ccb

View File

@ -90,11 +90,13 @@ int main(void)
randombytes_buf(buf2, bin_len);
if (memcmp(buf1, buf2, bin_len) *
sodium_compare(buf1, buf2, bin_len) < 0) {
printf("sodium_compare() failure with length=%zu\n", bin_len);
printf("sodium_compare() failure with length=%u\n",
(unsigned int) bin_len);
}
memcpy(buf1, buf2, bin_len);
if (sodium_compare(buf1, buf2, bin_len)) {
printf("sodium_compare() equality failure with length=%zu\n", bin_len);
printf("sodium_compare() equality failure with length=%u\n",
(unsigned int) bin_len);
}
}
return 0;