From a3ad4c4cc4849967f87fa904ff69b0ffca3695f9 Mon Sep 17 00:00:00 2001 From: Josh Elsasser Date: Sat, 31 Mar 2007 19:10:32 +0000 Subject: [PATCH] Unbreak multifile torrents. --- libtransmission/metainfo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libtransmission/metainfo.c b/libtransmission/metainfo.c index 57dd62e26..d9ab54cae 100644 --- a/libtransmission/metainfo.c +++ b/libtransmission/metainfo.c @@ -612,7 +612,7 @@ parseFiles( tr_info_t * inf, benc_val_t * name, { item = &files->val.l.vals[ii]; path = tr_bencDictFindFirst( item, "path.utf-8", "path", NULL ); - if( getfile( inf->files[ii-1].name, sizeof( inf->files[0].name ), + if( getfile( inf->files[ii].name, sizeof( inf->files[0].name ), inf->name, path ) ) { tr_err( "%s \"path\" entry", @@ -626,7 +626,7 @@ parseFiles( tr_info_t * inf, benc_val_t * name, ( length ? "Invalid" : "Missing" ) ); return 1; } - inf->files[ii-1].length = length->val.i; + inf->files[ii].length = length->val.i; inf->totalSize += length->val.i; } }