fixed bug in make torrents when saving merkle tree
This commit is contained in:
parent
125041d2bf
commit
42a220f9b8
|
@ -212,8 +212,8 @@ int main(int argc, char* argv[])
|
|||
if (!merklefile.empty())
|
||||
{
|
||||
output = fopen(merklefile.c_str(), "wb+");
|
||||
int ret = fwrite(&t.merkle_tree()[0], 1, t.merkle_tree().size(), output);
|
||||
if (ret != t.merkle_tree().size())
|
||||
int ret = fwrite(&t.merkle_tree()[0], 20, t.merkle_tree().size(), output);
|
||||
if (ret != t.merkle_tree().size() * 20)
|
||||
{
|
||||
fprintf(stderr, "failed to write %s: (%d) %s\n"
|
||||
, merklefile.c_str(), errno, strerror(errno));
|
||||
|
|
Loading…
Reference in New Issue