mirror of
https://git.um-react.app/um/lib_um_crypto_rust.git
synced 2026-03-08 04:29:54 +00:00
[kwm] fix: magic header detection
This commit is contained in:
@@ -91,8 +91,8 @@ impl Header {
|
|||||||
let mut format_name = [0u8; 0x0C];
|
let mut format_name = [0u8; 0x0C];
|
||||||
cursor.read_exact(&mut format_name)?;
|
cursor.read_exact(&mut format_name)?;
|
||||||
|
|
||||||
if magic != Self::MAGIC_1 || magic != Self::MAGIC_2 {
|
if magic != Self::MAGIC_1 && magic != Self::MAGIC_2 {
|
||||||
Err(KuwoCryptoError::InvalidHeaderMagic(magic))?;
|
Err(KuwoCryptoError::InvalidHeaderMagic(HeaderMagicBytes(magic)))?;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
|
|||||||
Reference in New Issue
Block a user