From ceea904db134af0605da3c614f9fdbf02c13f02c Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 23 Dec 2015 14:56:36 +0100 Subject: [PATCH] Changed: Use toString instead of sprintf --- code/nel/src/misc/debug.cpp | 8 ++++---- code/nel/src/misc/mem_displayer.cpp | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/code/nel/src/misc/debug.cpp b/code/nel/src/misc/debug.cpp index bcd2d25cb..45a55188c 100644 --- a/code/nel/src/misc/debug.cpp +++ b/code/nel/src/misc/debug.cpp @@ -715,7 +715,8 @@ public: { str = ""; } - str += toString("!0x%X", addr); + + str += toString("!0x%p", (void*)addr); } // @@ -740,9 +741,8 @@ public: { str = ""; } - char tmp[32]; - sprintf (tmp, "!0x%p", addr); - str += tmp; + + str += toString("!0x%p", (void*)addr); //} str +=" DEBUG:"+toString("0x%p", addr); diff --git a/code/nel/src/misc/mem_displayer.cpp b/code/nel/src/misc/mem_displayer.cpp index 0aaac26cc..d92c4d432 100644 --- a/code/nel/src/misc/mem_displayer.cpp +++ b/code/nel/src/misc/mem_displayer.cpp @@ -138,9 +138,8 @@ static string getSourceInfo (DWORD_TYPE addr) { str = ""; } - char tmp[32]; - sprintf (tmp, "!0x%X", addr); - str += tmp; + + str += toString("!0x%p", (void*)addr); } return str;