[URLMON] Fix a LARGE_INTEGER truncation
Rolf Kalbermatter
rolf.kalbermatter at citeng.com
Thu Jan 5 05:26:09 CST 2006
Changelog
- dlls/urlmon/umstream.c
Fix a LARGE_INTEGER truncation
License: X11, LGPL
Rolf Kalbermatter
Index: dlls/urlmon/umstream.c
===================================================================
RCS file: /home/wine/wine/dlls/urlmon/umstream.c,v
retrieving revision 1.4
diff -u -r1.4 umstream.c
--- dlls/urlmon/umstream.c 12 Dec 2005 12:46:22 -0000 1.4
+++ dlls/urlmon/umstream.c 5 Jan 2006 10:52:47 -0000
@@ -252,27 +252,28 @@
return E_NOTIMPL;
}
-static HRESULT WINAPI IStream_fnSeek ( IStream * iface,
+static HRESULT WINAPI IStream_fnSeek (IStream * iface,
LARGE_INTEGER dlibMove,
DWORD dwOrigin,
ULARGE_INTEGER* plibNewPosition)
{
- DWORD pos, newposlo;
+ DWORD newposlo;
LONG newposhi;
IUMCacheStream *This = (IUMCacheStream *)iface;
TRACE("(%p)\n",This);
- pos = dlibMove.QuadPart; /* FIXME: truncates */
- newposhi = 0;
- newposlo = SetFilePointer( This->handle, pos, &newposhi, dwOrigin );
+ newposhi = dlibMove.u.HighPart;
+ newposlo = SetFilePointer( This->handle, dlibMove.u.LowPart, &newposhi, dwOrigin );
if( newposlo == INVALID_SET_FILE_POINTER && GetLastError())
return E_FAIL;
- if (plibNewPosition)
- plibNewPosition->QuadPart = newposlo | ( (LONGLONG)newposhi<<32);
-
+ if (plibNewPosition)
+ {
+ plibNewPosition->u.LowPart = newposlo;
+ plibNewPosition->u.HighPart = newposhi;
+ }
return S_OK;
}
@@ -283,7 +284,7 @@
TRACE("(%p)\n",This);
- if( ! SetFilePointer( This->handle, libNewSize.QuadPart, NULL, FILE_BEGIN ) )
+ if( ! SetFilePointer( This->handle, libNewSize.u.LowPart, &(libNewSize.u.HighPart), FILE_BEGIN ) )
return E_FAIL;
if( ! SetEndOfFile( This->handle ) )
More information about the wine-patches
mailing list