From 3b9cafc058daff03b676977bb73e52829236c831 Mon Sep 17 00:00:00 2001 From: oddMLan Date: Mon, 13 May 2019 01:32:00 -0700 Subject: [PATCH] [Debugger UI] Try to handle spaces in Mem Viewer address editbox FormatClipboard() doesn't seem to be doing anything for some reason. --- Source/Project64/UserInterface/WTLControls/EditNumber32.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/Project64/UserInterface/WTLControls/EditNumber32.cpp b/Source/Project64/UserInterface/WTLControls/EditNumber32.cpp index 7f99766b4..165652634 100644 --- a/Source/Project64/UserInterface/WTLControls/EditNumber32.cpp +++ b/Source/Project64/UserInterface/WTLControls/EditNumber32.cpp @@ -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)