mirror of
https://github.com/transmission/transmission
synced 2024-12-26 09:37:56 +00:00
(trunk libT) #4106 "Assert in buildHandshakeMessage, r12131" -- probable fix
This commit is contained in:
parent
77a0a0b619
commit
76fdae97cb
1 changed files with 1 additions and 1 deletions
|
@ -217,7 +217,7 @@ buildHandshakeMessage( tr_handshake * handshake, uint8_t * buf )
|
|||
uint8_t * walk = buf;
|
||||
const uint8_t * torrentHash = tr_cryptoGetTorrentHash( handshake->crypto );
|
||||
const tr_torrent * tor = tr_torrentFindFromHash( handshake->session, torrentHash );
|
||||
const uint8_t * peer_id = tor ? tor->peer_id : tr_getPeerId( handshake->session );
|
||||
const uint8_t * peer_id = tor && *tor->peer_id ? tor->peer_id : tr_getPeerId( handshake->session );
|
||||
|
||||
memcpy( walk, HANDSHAKE_NAME, HANDSHAKE_NAME_LEN );
|
||||
walk += HANDSHAKE_NAME_LEN;
|
||||
|
|
Loading…
Reference in a new issue