From 3cb48f661e63b031f1a2de2d2f8fd722fc5ea0b7 Mon Sep 17 00:00:00 2001 From: James Tabor Date: Sat, 19 Sep 2009 22:17:25 +0000 Subject: [PATCH] - Two bugs found by Michael Martin. svn path=/trunk/; revision=43086 --- reactos/dll/win32/user32/windows/menu.c | 2 +- reactos/subsystems/win32/csrss/win32csr/dllmain.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/dll/win32/user32/windows/menu.c b/reactos/dll/win32/user32/windows/menu.c index 82e3ee5dd68..169a9c8c4ce 100644 --- a/reactos/dll/win32/user32/windows/menu.c +++ b/reactos/dll/win32/user32/windows/menu.c @@ -3967,7 +3967,7 @@ User32CallLoadMenuFromKernel(PVOID Arguments, ULONG ArgumentLength) Common = (PLOADMENU_CALLBACK_ARGUMENTS) Arguments; - Result = (LRESULT)LoadMenuW(Common->hModule, (LPCWSTR)&Common->MenuName); + Result = (LRESULT)LoadMenuW(Common->hModule, IS_INTRESOURCE(Common->MenuName) ? Common->MenuName : (LPCWSTR)&Common->MenuName); return ZwCallbackReturn(&Result, sizeof(LRESULT), STATUS_SUCCESS); } diff --git a/reactos/subsystems/win32/csrss/win32csr/dllmain.c b/reactos/subsystems/win32/csrss/win32csr/dllmain.c index e6ef5573f81..85de976045b 100644 --- a/reactos/subsystems/win32/csrss/win32csr/dllmain.c +++ b/reactos/subsystems/win32/csrss/win32csr/dllmain.c @@ -386,7 +386,7 @@ Win32CsrHardError(IN PCSRSS_PROCESS_DATA ProcessData, CaptionText = (LPSTR)RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, CaptionSize); RtlCopyMemory(CaptionText, MessageA.Buffer+1, CaptionSize-1); - CaptionSize += 3; // "}\r\n" - 3 + CaptionSize += 2; // "}\r\n" - 3 szxCaptionText = (LPWSTR)RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(wchar_t)*CaptionSize+ClientFileNameU.MaximumLength+128); if( ClientFileNameU.Buffer ) {