mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Fixed negativ positions in SetFilePointer().
svn path=/trunk/; revision=2780
This commit is contained in:
parent
68230ee1f4
commit
329e4b6888
1 changed files with 13 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: file.c,v 1.28 2001/11/01 10:35:15 hbirr Exp $
|
/* $Id: file.c,v 1.29 2002/03/25 21:07:17 hbirr Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
|
@ -172,7 +172,18 @@ SetFilePointer(HANDLE hFile,
|
||||||
hFile,lDistanceToMove,dwMoveMethod);
|
hFile,lDistanceToMove,dwMoveMethod);
|
||||||
|
|
||||||
Distance.u.LowPart = lDistanceToMove;
|
Distance.u.LowPart = lDistanceToMove;
|
||||||
Distance.u.HighPart = (lpDistanceToMoveHigh) ? *lpDistanceToMoveHigh : 0;
|
if (lpDistanceToMoveHigh)
|
||||||
|
{
|
||||||
|
Distance.u.HighPart = *lpDistanceToMoveHigh;
|
||||||
|
}
|
||||||
|
else if (lDistanceToMove >= 0)
|
||||||
|
{
|
||||||
|
Distance.u.HighPart = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Distance.u.HighPart = -1;
|
||||||
|
}
|
||||||
|
|
||||||
if (dwMoveMethod == FILE_CURRENT)
|
if (dwMoveMethod == FILE_CURRENT)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue