Skip to content

Commit

Permalink
int big endian fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ismaileke committed Aug 25, 2024
1 parent be14a34 commit 27ea147
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ pub mod binary {
}
}

pub fn put_int(&mut self, value: i32) {
pub fn put_int(&mut self, value: u32) {
let bytes: [u8; 4] = value.to_be_bytes();
self.buffer.extend_from_slice(&bytes);
}
Expand All @@ -229,7 +229,7 @@ pub mod binary {
}
}

pub fn put_l_int(&mut self, value: i32) {
pub fn put_l_int(&mut self, value: u32) {
let bytes: [u8; 4] = value.to_le_bytes();
self.buffer.extend_from_slice(&bytes);
}
Expand Down

0 comments on commit 27ea147

Please sign in to comment.