fix negative file size to add_file

This commit is contained in:
Arvid Norberg 2012-02-07 03:45:13 +00:00
parent 5df78592db
commit c82695ef8e
1 changed files with 1 additions and 0 deletions

View File

@ -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