Skip to content

Commit

Permalink
Make opcodes le
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-zu committed Jan 30, 2024
1 parent 218b684 commit 28c3597
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/shroom-pkt/src/pkt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pub struct Message(Packet);
impl Message {
/// Gets the opcode as u16 value
pub fn opcode_value(&self) -> u16 {
u16::from_be_bytes(self.0[0..2].try_into().expect("Message opcode"))
u16::from_le_bytes(self.0[0..2].try_into().expect("Message opcode"))
}

/// Gets the typed opcode of the message
Expand Down

0 comments on commit 28c3597

Please sign in to comment.