mirror of
https://github.com/reactos/reactos.git
synced 2026-06-01 08:50:24 +08:00
[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:
@@ -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 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user