+ Fixed bug in SFileSetFilePointer

This commit is contained in:
Ladislav Zezula
2014-05-06 14:18:10 +02:00
parent fd430b981c
commit c8f8ef264e

View File

@@ -839,7 +839,7 @@ DWORD WINAPI SFileSetFilePointer(HANDLE hFile, LONG lFilePos, LONG * plFilePosHi
// Now calculate the new file pointer
// Do not allow the file pointer to overflow
FilePosition = ((FilePosition + MoveOffset) > FilePosition) ? (FilePosition + MoveOffset) : 0;
FilePosition = ((FilePosition + MoveOffset) >= FilePosition) ? (FilePosition + MoveOffset) : 0;
// Now apply the file pointer to the file
if(hf->pStream != NULL)