From 3db1a3bfd1f49ecbcc197d8f892d309f416b017e Mon Sep 17 00:00:00 2001 From: NeoBrainX Date: Thu, 8 Apr 2010 14:58:50 +0000 Subject: [PATCH] Fix another wrong sprintf usage git-svn-id: http://dolphin-emu.googlecode.com/svn/trunk@5296 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DebuggerUICommon/Src/MemoryView.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Source/Core/DebuggerUICommon/Src/MemoryView.cpp b/Source/Core/DebuggerUICommon/Src/MemoryView.cpp index 5b8396d26..307e356d0 100644 --- a/Source/Core/DebuggerUICommon/Src/MemoryView.cpp +++ b/Source/Core/DebuggerUICommon/Src/MemoryView.cpp @@ -373,32 +373,33 @@ void CMemoryView::OnPaint(wxPaintEvent& event) for (int i = 0; i < 8; i++) { + char buf[32] = ""; switch (dataType) { case 0: - sprintf(dis, "%s %02X %02X %02X %02X", dis, + sprintf(buf, " %02X %02X %02X %02X", ((mema[i]&0xff000000)>>24)&0xFF, ((mema[i]&0xff0000)>>16)&0xFF, ((mema[i]&0xff00)>>8)&0xFF, mema[i]&0xff); break; case 1: - sprintf(dis, "%s %02X%02X %02X%02X", dis, + sprintf(buf, " %02X%02X %02X%02X", ((mema[i]&0xff000000)>>24)&0xFF, ((mema[i]&0xff0000)>>16)&0xFF, ((mema[i]&0xff00)>>8)&0xFF, mema[i]&0xff); break; case 2: - sprintf(dis, "%s %02X%02X%02X%02X", dis, + sprintf(buf, " %02X%02X%02X%02X", ((mema[i]&0xff000000)>>24)&0xFF, ((mema[i]&0xff0000)>>16)&0xFF, ((mema[i]&0xff00)>>8)&0xFF, mema[i]&0xff); break; } + strcat(dis, buf); } - strcat(dis, "\0"); curAddress += 32; } else -- 2.11.4.GIT