From c82695ef8ed8f3841de365975e770f3d74c4ab87 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Tue, 7 Feb 2012 03:45:13 +0000 Subject: [PATCH] fix negative file size to add_file --- src/file_storage.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/file_storage.cpp b/src/file_storage.cpp index b0c2bcc0d..e11f1f879 100644 --- a/src/file_storage.cpp +++ b/src/file_storage.cpp @@ -299,6 +299,7 @@ namespace libtorrent , std::time_t mtime, std::string const& symlink_path) { TORRENT_ASSERT(size >= 0); + if (size < 0) size = 0; if (!has_parent_path(file)) { // you have already added at least one file with a