瀏覽代碼

net/protocol/protocal_address: minor calculation fix

aggstam 2 年之前
父節點
當前提交
af7c280dd3
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/net/protocol/protocol_address.rs

+ 1 - 1
src/net/protocol/protocol_address.rs

@@ -136,7 +136,7 @@ impl ProtocolAddress {
 
             // Then we grab addresses without the requested transports
             // to fill a 2 * max length vector.
-            let remain = 2 * get_addrs_msg.max - addrs.len();
+            let remain = 2 * get_addrs_msg.max - addrs.len() as u32;
             addrs.append(
                 &mut self
                     .hosts