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