1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-27 18:18:10 +00:00

fixup! fix: bitfield assertion failure on zero-byte file

chore: code style
This commit is contained in:
Charles Kerr 2022-02-21 14:39:00 -06:00
parent 4bf613804c
commit 81441706c1

View file

@ -2004,7 +2004,7 @@ tr_block_span_t tr_torGetFileBlockSpan(tr_torrent const* tor, tr_file_index_t i)
auto const begin_block = tor->byteLoc(begin_byte).block; auto const begin_block = tor->byteLoc(begin_byte).block;
if (begin_byte >= end_byte) // 0-byte file if (begin_byte >= end_byte) // 0-byte file
{ {
return { begin_block, begin_block + 1}; return { begin_block, begin_block + 1 };
} }
auto const final_block = tor->byteLoc(end_byte - 1).block; auto const final_block = tor->byteLoc(end_byte - 1).block;