From 41beb716367866d84311d8496477d9357a5c4628 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Fri, 9 Jan 2004 20:09:08 +0000 Subject: [PATCH] Allow offset of NULL to NtWriteFile. --- dlls/ntdll/file.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c index 12ece05fae1..3889fc7c4cb 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c @@ -558,8 +558,12 @@ NTSTATUS WINAPI NtWriteFile(HANDLE hFile, HANDLE hEvent, ovp->async.event = hEvent; ovp->async.iosb = io_status; ovp->count = length; - ovp->offset = offset->s.LowPart; - if (offset->s.HighPart) FIXME("NIY-high part\n"); + if (offset) { + ovp->offset = offset->s.LowPart; + if (offset->s.HighPart) FIXME("NIY-high part\n"); + } else { + ovp->offset = 0; + } ovp->apc = apc; ovp->apc_user = apc_user; ovp->buffer = (void*)buffer;