mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 18:20:26 +01:00
use correct printf format spec for UIntPtr
This commit is contained in:
parent
958387b6ba
commit
7f071c9171
@ -19,6 +19,7 @@
|
||||
#include <locale>
|
||||
#endif
|
||||
#include <cstdio>
|
||||
#include <cinttypes>
|
||||
|
||||
|
||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
@ -475,13 +476,9 @@ void NumberFormatter::append(std::string& str, const void* ptr)
|
||||
{
|
||||
char buffer[24];
|
||||
#if defined(POCO_PTR_IS_64_BIT)
|
||||
#if defined(POCO_LONG_IS_64_BIT)
|
||||
std::sprintf(buffer, "%016lX", (UIntPtr) ptr);
|
||||
std::sprintf(buffer, "%016" PRIXPTR, (UIntPtr) ptr);
|
||||
#else
|
||||
std::sprintf(buffer, "%016" I64_FMT "X", (UIntPtr) ptr);
|
||||
#endif
|
||||
#else
|
||||
std::sprintf(buffer, "%08lX", (UIntPtr) ptr);
|
||||
std::sprintf(buffer, "%08" PRIXPTR, (UIntPtr) ptr);
|
||||
#endif
|
||||
str.append(buffer);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user