aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLadislav Zezula <zezula@volny.cz>2018-05-02 08:01:59 +0200
committerGitHub <noreply@github.com>2018-05-02 08:01:59 +0200
commit7292399efefe279c2f090d70ec7abf462a3f7f96 (patch)
treeffe2bc0dd9be30976978bba2bcb2e6fa58b2be48 /src
parenteecbac1689b1f7ea09c93812ba1f4d51a3436bb7 (diff)
parenta881bb54bf4be80f561718c4c5854313650ba2dd (diff)
Merge pull request #131 from nvs/master
Add brackets in SFileSetFilePointer when pointer < 0
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