forked from premiere/premiere-libtorrent
fix part-file header allocation
This commit is contained in:
parent
77102102d6
commit
a5e0578c88
|
@ -98,7 +98,7 @@ namespace libtorrent
|
||||||
if (!ec)
|
if (!ec)
|
||||||
{
|
{
|
||||||
// parse header
|
// parse header
|
||||||
boost::scoped_array<boost::uint32_t> header(new boost::uint32_t[m_header_size]);
|
boost::scoped_array<boost::uint32_t> header(new boost::uint32_t[m_header_size / 4]);
|
||||||
file::iovec_t b = {header.get(), size_t(m_header_size) };
|
file::iovec_t b = {header.get(), size_t(m_header_size) };
|
||||||
int n = m_file.readv(0, &b, 1, ec);
|
int n = m_file.readv(0, &b, 1, ec);
|
||||||
if (ec) return;
|
if (ec) return;
|
||||||
|
@ -396,7 +396,7 @@ namespace libtorrent
|
||||||
open_file(file::read_write, ec);
|
open_file(file::read_write, ec);
|
||||||
if (ec) return;
|
if (ec) return;
|
||||||
|
|
||||||
boost::scoped_array<boost::uint32_t> header(new boost::uint32_t[m_header_size]);
|
boost::scoped_array<boost::uint32_t> header(new boost::uint32_t[m_header_size / 4]);
|
||||||
|
|
||||||
using namespace libtorrent::detail;
|
using namespace libtorrent::detail;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue