diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2014-05-28 11:18:22 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2014-05-28 11:18:22 +0200 |
commit | db1877e6fd34740620743197beef9ec67cb3b415 (patch) | |
tree | ebd5aa8ff5ab7a1c05197eccd86001ed209225d4 /test/test_multiplexer.cc | |
parent | c89c4cf531ba2bd8980c1011a340fbf679426092 (diff) |
Fix sprintf of uint64_t.
Diffstat (limited to 'test/test_multiplexer.cc')
-rw-r--r-- | test/test_multiplexer.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/test_multiplexer.cc b/test/test_multiplexer.cc index d431707..7eec468 100644 --- a/test/test_multiplexer.cc +++ b/test/test_multiplexer.cc @@ -61,7 +61,14 @@ std::string bin2str(uint64_t i) { char test[32]; i = htonll(i); - sprintf(test, "%016llX", i); + if(sizeof(long long) == 8) { + sprintf(test, "%016llX", (unsigned long long)i); + } else if(sizeof(long) == 8) { + sprintf(test, "%016lX", (unsigned long)i); + } else { + sprintf(test, "?????"); + } + return test; } |