diff --git a/src/file.cpp b/src/file.cpp index c6f41b674..04ba62156 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -587,7 +587,7 @@ namespace libtorrent LARGE_INTEGER offs; offs.QuadPart = file_offset; - if (SetFilePointerEx(m_file_handle, offs, &offs, SEEK_SET) == FALSE) + if (SetFilePointerEx(m_file_handle, offs, &offs, FILE_BEGIN) == FALSE) { ec = error_code(GetLastError(), get_system_category()); return -1; diff --git a/src/storage.cpp b/src/storage.cpp index c54da57c9..f9e57c95a 100644 --- a/src/storage.cpp +++ b/src/storage.cpp @@ -273,7 +273,7 @@ namespace libtorrent // in sparse mode, allow the files to be more recent // than the resume data, but only by 5 minutes if ((compact_mode && (time > s->second + 1 || time < s->second - 1)) || - (!compact_mode && (time > s->second + 5 * 60) || time < s->second - 1)) + (!compact_mode && (time > s->second + 5 * 60 || time < s->second - 1))) { if (error) *error = "timestamp mismatch for file '" + i->path.external_file_string()