forked from premiere/premiere-libtorrent
fixed integer overflow in file_storage::map_file
This commit is contained in:
parent
e071bf113e
commit
6627ae86d6
|
@ -290,7 +290,7 @@ namespace libtorrent
|
||||||
|
|
||||||
peer_request ret;
|
peer_request ret;
|
||||||
ret.piece = int(offset / piece_length());
|
ret.piece = int(offset / piece_length());
|
||||||
ret.start = int(offset - ret.piece * piece_length());
|
ret.start = int(offset % piece_length());
|
||||||
ret.length = size;
|
ret.length = size;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue