summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/SFileReadFile.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/SFileReadFile.cpp b/src/SFileReadFile.cpp
index 3831165..a6b3bc4 100644
--- a/src/SFileReadFile.cpp
+++ b/src/SFileReadFile.cpp
@@ -868,8 +868,10 @@ DWORD WINAPI SFileSetFilePointer(HANDLE hFile, LONG lFilePos, LONG * plFilePosHi
if((LONGLONG)DeltaPos < 0)
{
if(NewPosition > FileSize) // Position is negative
+ {
SetLastError(ERROR_NEGATIVE_SEEK);
return SFILE_INVALID_POS;
+ }
}
// If moving forward, don't allow the new position go past the end of the file