Author: tfaber
Date: Fri Aug 3 06:38:44 2012
New Revision: 57031
URL:
http://svn.reactos.org/svn/reactos?rev=57031&view=rev
Log:
[KERNEL32]
- Sync FormatMessage implementation to Wine 1.5.4. Fixes crash in
kernel32_winetest:format_msg.
See issue #7217 for more details.
Modified:
trunk/reactos/dll/win32/kernel32/winnls/string/format_msg.c
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/kernel32/winnls/string/format_msg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/winnls/string/format_msg.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/winnls/string/format_msg.c [iso-8859-1] Fri Aug 3
06:38:44 2012
@@ -70,7 +70,6 @@
* Yes, ANSI strings in win32 resources. Go figure.
*/
-static const WCHAR PCNTFMTWSTR[] = { '%','%','%','s',0
};
static const WCHAR FMTWSTR[] = { '%','s',0 };
/**********************************************************************
@@ -138,15 +137,18 @@
if (*format != '!') /* simple string */
{
arg = get_arg( insert, flags, args );
- if (unicode_caller)
- {
- WCHAR *str = (WCHAR *)arg;
+ if (unicode_caller || !arg)
+ {
+ static const WCHAR nullW[] =
{'(','n','u','l','l',')',0};
+ const WCHAR *str = (const WCHAR *)arg;
+
+ if (!str) str = nullW;
*result = HeapAlloc( GetProcessHeap(), 0, (strlenW(str) + 1) * sizeof(WCHAR)
);
strcpyW( *result, str );
}
else
{
- char *str = (char *)arg;
+ const char *str = (const char *)arg;
DWORD length = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0 );
*result = HeapAlloc( GetProcessHeap(), 0, length * sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, str, -1, *result, length );
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Fri Aug 3 06:38:44 2012
@@ -233,10 +233,19 @@
reactos/dll/win32/gdi32/objects/linedda.c # Synced at 20090410
kernel32 -
- reactos/dll/win32/kernel32/misc/errormsg.c # Out of sync
- reactos/dll/win32/kernel32/misc/profile.c # Out of sync
- reactos/dll/win32/kernel32/misc/lcformat.c # Synced to Wine-1_3
- reactos/dll/win32/kernel32/misc/lzexpand.c # Synced to Wine-1_1_23
+ reactos/dll/win32/kernel32/wine/actctx.c # Partly synced
+ reactos/dll/win32/kernel32/wine/comm.c # Synced in r52754
+ reactos/dll/win32/kernel32/wine/lzexpand.c # Synced in r52754
+ reactos/dll/win32/kernel32/wine/profile.c # Synced in r52754
+ reactos/dll/win32/kernel32/wine/res.c # Synced in r52754
+ reactos/dll/win32/kernel32/winnls/string/casemap.c # Synced in r52754
+ reactos/dll/win32/kernel32/winnls/string/chartype.c # Synced in r52754
+ reactos/dll/win32/kernel32/winnls/string/collation.c # Synced in r52754
+ reactos/dll/win32/kernel32/winnls/string/format_msg.c # Synced to Wine-1.5.4
+ reactos/dll/win32/kernel32/winnls/string/lang.c # Synced in r52754
+ reactos/dll/win32/kernel32/winnls/string/lcformat.c # Synced in r52754
+ reactos/dll/win32/kernel32/winnls/string/nls.c # Synced in r52754
+ reactos/dll/win32/kernel32/winnls/string/sortkey.c # Synced in r52754
msvcrt -
reactos/lib/sdk/crt/except/cpp.c # Synced at 20080528