fix bug with ascii memview: make '\0' be ' ' instead of string end.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4487 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
ec77ba3e99
commit
b7bd9dc5d9
|
@ -340,9 +340,11 @@ void CMemoryView::OnPaint(wxPaintEvent& event)
|
|||
}
|
||||
else if (viewAsType == VIEWAS_ASCII)
|
||||
{
|
||||
sprintf(dis, "%c%c%c%c",
|
||||
(mem_data&0xff000000)>>24, (mem_data&0xff0000)>>16,
|
||||
(mem_data&0xff00)>>8, mem_data&0xff);
|
||||
char a[4] = {(mem_data&0xff000000)>>24, (mem_data&0xff0000)>>16, (mem_data&0xff00)>>8, mem_data&0xff};
|
||||
for (size_t i = 0; i < 4; i++)
|
||||
if (a[i] == '\0')
|
||||
a[i] = ' ';
|
||||
sprintf(dis, "%c%c%c%c", a[0], a[1], a[2], a[3]);
|
||||
}
|
||||
else
|
||||
sprintf(dis, "INVALID VIEWAS TYPE");
|
||||
|
|
Loading…
Reference in New Issue