diff options
author | Ladislav Zezula <ladislav.zezula@avg.com> | 2013-12-12 11:15:16 +0100 |
---|---|---|
committer | Ladislav Zezula <ladislav.zezula@avg.com> | 2013-12-12 11:15:16 +0100 |
commit | 6961cd51b65e8df7f807e25ab6ffc4da8c205449 (patch) | |
tree | 48bcfa6c0bb51171b3cb25330abb0e5caf051ff9 /src/SFileReadFile.cpp | |
parent | 5106d34fdaaf6378abf0fa8bb0b30d54a487e398 (diff) |
+ Fixed warnings
+ Added SBaseDumpData to the makefiles
Diffstat (limited to 'src/SFileReadFile.cpp')
-rw-r--r-- | src/SFileReadFile.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/SFileReadFile.cpp b/src/SFileReadFile.cpp index cfc8d2a..ff4783c 100644 --- a/src/SFileReadFile.cpp +++ b/src/SFileReadFile.cpp @@ -827,10 +827,8 @@ DWORD WINAPI SFileSetFilePointer(HANDLE hFile, LONG lFilePos, LONG * plFilePosHi MoveOffset = MAKE_OFFSET64(dwFilePosHi, lFilePos); // Now calculate the new file pointer - // Do not allow the file pointer to go before the begin of the file - FilePosition += MoveOffset; - if(FilePosition < 0) - FilePosition = 0; + // Do not allow the file pointer to overflow + FilePosition = ((FilePosition + MoveOffset) > FilePosition) ? (FilePosition + MoveOffset) : 0; // Now apply the file pointer to the file if(hf->pStream != NULL) |