[WORDPAD] Fix garbage in "Get Text" dialog (#7922)

This fixes the garbage in the "Get Text" dialog which occurs if there is no text input
and one clicks on "Get Text" under Extras.

CORE-19868
Reported to Wine: https://bugs.winehq.org/show_bug.cgi?id=58144
This commit is contained in:
Petru Răzvan
2025-05-04 23:28:32 +03:00
committed by GitHub
parent 7c8a8400e0
commit 2aa6fc1c7f

View File

@@ -2294,6 +2294,9 @@ static LRESULT OnCommand( HWND hWnd, WPARAM wParam, LPARAM lParam)
tr.chrg.cpMax = nLen;
tr.lpstrText = data;
SendMessageW(hwndEditor, EM_GETTEXTRANGE, 0, (LPARAM)&tr);
#ifdef __REACTOS__
data[tr.chrg.cpMax - tr.chrg.cpMin] = UNICODE_NULL;
#endif
MessageBoxW(NULL, data, wszAppTitle, MB_OK);
HeapFree( GetProcessHeap(), 0, data );