winedos: Check a file handle against INVALID_HANDLE_VALUE, not 0.

Michael Stefaniuc mstefani at redhat.de
Thu Mar 8 16:21:07 CST 2007


---
 dlls/winedos/int2f.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/winedos/int2f.c b/dlls/winedos/int2f.c
index dcb19c4..7bbf5e4 100644
--- a/dlls/winedos/int2f.c
+++ b/dlls/winedos/int2f.c
@@ -564,7 +564,7 @@ static void MSCDEX_Request(BYTE *driver_request, BOOL dorealmode)
     PTR_AT(driver_request, 3, WORD) = 0;
     devName[4] = 'A' + CDROM_GetHeap()->hdr.drive + driver_request[1];
     h = CreateFileA(devName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0);
-    if (!h) {
+    if (h == INVALID_HANDLE_VALUE) {
         WARN("Couldn't open cdrom handle\n");
         driver_request[4] |= 0x80;
         driver_request[3] = 1;  /* unknown unit */
-- 
1.5.0.2


-- 
Michael Stefaniuc               Tel.: +49-711-96437-199
Sr. Network Engineer            Fax.: +49-711-96437-111
Red Hat GmbH                    Email: mstefani at redhat.com
Hauptstaetterstr. 58            http://www.redhat.de/
D-70178 Stuttgart
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070308/202fa25f/attachment.pgp


More information about the wine-patches mailing list