From 27ea147971259476d09705f02ab78d5c7fe95141 Mon Sep 17 00:00:00 2001 From: ismaileke Date: Mon, 26 Aug 2024 00:18:23 +0300 Subject: [PATCH] int big endian fix --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 7d88685..05bf34e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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); } @@ -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); }