Skip to content

Commit

Permalink
Merge pull request #5 "Fix decoding of UDP ping packets"
Browse files Browse the repository at this point in the history
  • Loading branch information
Johni0702 committed Jan 1, 2021
2 parents e3a56f1 + c257d9e commit 84e33fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/voice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ impl<EncodeDst: VoicePacketDst, DecodeDst: VoicePacketDst> Decoder
let kind = header >> 5;
let target = header & 0b11111;
let result = if kind == 1 {
VoicePacket::Ping {
timestamp: buf.read_varint()?,
}
let timestamp = buf.read_varint()?;
buf_mut.advance(buf_mut.len());
VoicePacket::Ping { timestamp }
} else {
let session_id = DecodeDst::read_session_id(&mut buf)?;
let seq_num = buf.read_varint()?;
Expand Down

0 comments on commit 84e33fe

Please sign in to comment.