Explorar el Código

rust-protocol: Fix value in Salt packets.

Mathias Gottschlag hace 5 años
padre
commit
e36c766458
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1
    1
      common/rust-protocol/src/lib.rs

+ 1
- 1
common/rust-protocol/src/lib.rs Ver fichero

@@ -67,7 +67,7 @@ impl Packet {
67 67
             }
68 68
             Self::Salt(salt) => {
69 69
                 data[0] = 1;
70
-                data[1..9].copy_from_slice(&salt.to_le_bytes());
70
+                data[1..8].copy_from_slice(&(salt >> 8 as u64).to_le_bytes()[0..7]);
71 71
                 true
72 72
             }
73 73
             Self::Report(report) => {

Loading…
Cancelar
Guardar