add some debug messages for John_Clay

This commit is contained in:
Charles Kerr 2008-04-19 15:59:31 +00:00
parent 6b1f54134d
commit c28e59e8b2
1 changed files with 7 additions and 1 deletions

View File

@ -124,7 +124,13 @@ findFileLocation( const tr_torrent * tor,
*fileOffset = offset - inf->files[first].offset;
assert( inf->files[first].offset <= offset );
assert( offset < inf->files[first].offset + inf->files[first].length );
if( offset >= inf->files[first].offset + inf->files[first].length ) {
fprintf( stderr, "offset is %"PRIu64"\n", offset );
fprintf( stderr, "inf->fileCount is %d\n", (int)inf->fileCount );
fprintf( stderr, "inf->files[first].offset is %"PRIu64"\n", inf->files[first].offset );
fprintf( stderr, "inf->files[first].length is %"PRIu64"\n", inf->files[first].length );
assert( offset < inf->files[first].offset + inf->files[first].length );
}
assert( *fileIndex < inf->fileCount );
assert( *fileOffset < inf->files[first].length );
}