fix for opening con device

Rein Klazes wijn at wanadoo.nl
Tue Jan 11 07:52:56 CST 2005


Hi,

Changelog:
	dlls/kernel	: file.c
	memicmpW() count are WCHAR's not bytes. Fixes opening
	CON device.

Rein.
-------------- next part --------------
--- wine/dlls/kernel/file.c	2004-12-29 12:09:47.000000000 +0100
+++ mywine/dlls/kernel/file.c	2005-01-11 14:33:33.000000000 +0100
@@ -1247,7 +1247,8 @@ HANDLE WINAPI CreateFileW( LPCWSTR filen
         static const WCHAR conW[] = {'C','O','N'};
 
         if (LOWORD(dosdev) == sizeof(conW) &&
-            !memicmpW( filename + HIWORD(dosdev)/sizeof(WCHAR), conW, sizeof(conW)))
+            !memicmpW( filename + HIWORD(dosdev) / sizeof(WCHAR), conW,
+                sizeof( conW) / sizeof( WCHAR)))
         {
             switch (access & (GENERIC_READ|GENERIC_WRITE))
             {


More information about the wine-patches mailing list