[Debugger UI] Try to handle spaces in Mem Viewer address editbox

FormatClipboard() doesn't seem to be doing anything for some reason.
This commit is contained in:
oddMLan 2019-05-13 01:32:00 -07:00
parent 2bbd724b91
commit 3b9cafc058
1 changed files with 5 additions and 1 deletions

View File

@ -84,7 +84,7 @@ bool CEditNumber32::IsHexConvertableText(LPTSTR _text)
for (; i < strlen(_text); i++)
{
char c = _text[i];
if (!(c >= 48 && c <= 57 || c >= 'A'&&c <= 'F' || c >= 'a'&&c <= 'f'))
if (!(c >= 48 && c <= 57 || c >= 'A'&&c <= 'F' || c >= 'a'&&c <= 'f' || c == ' '))
{
bPaste = false;
break;
@ -115,6 +115,10 @@ void CEditNumber32::FormatClipboard()
{
lptstr[i] = 'x';
}
if (lptstr[i] == ' ' && (i < strlen(lptstr)))
{
strcpy(&lptstr[i], &lptstr[i + 1]);
}
}
hglb = GlobalAlloc(GMEM_MOVEABLE, (strlen(lptstr) + 1) * sizeof(TCHAR));
if (hglb == NULL)