mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-24 23:08:36 +01:00
Merge pull request #2191 from TheBlueMatt/2023-04-fix-bucket-deser
Fix deserialization of u16 arrays
This commit is contained in:
commit
c977def259
1 changed files with 1 additions and 1 deletions
|
@ -596,7 +596,7 @@ impl Readable for [u16; 8] {
|
|||
r.read_exact(&mut buf)?;
|
||||
let mut res = [0u16; 8];
|
||||
for (idx, v) in res.iter_mut().enumerate() {
|
||||
*v = (buf[idx] as u16) << 8 | (buf[idx + 1] as u16)
|
||||
*v = (buf[idx*2] as u16) << 8 | (buf[idx*2 + 1] as u16)
|
||||
}
|
||||
Ok(res)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue