mirror of
https://github.com/Ap0dexMe0/unixtract.git
synced 2026-07-16 05:04:22 +02:00
fix epk3 detection for newer epk3's
This commit is contained in:
+7
-4
@@ -14,15 +14,18 @@ pub fn is_epk_file(file: &File) -> bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn check_epk_version(versions: &[u8]) -> Option<String> {
|
fn check_epk_version(versions: &[u8]) -> Option<String> {
|
||||||
// _ - 0x00 X - a number . - a dot
|
// _ - 0x00 X - a number . - a dot
|
||||||
let epk2_pattern = "____XXXX.XXXX.XXXX__XX.XX.XXX_______";
|
let epk2_pattern = "____XXXX.XXXX.XXXX__XX.XX.XXX_______";
|
||||||
let epk3_pattern = "____X.X.X___________X.X.X___________";
|
let epk3_pattern = "____X.X.X___________X.X.X___________";
|
||||||
|
let epk3_new_pattern = "____XX.X.X__________XX.X.X__________";
|
||||||
|
|
||||||
if match_with_pattern(&versions, epk2_pattern) {
|
if match_with_pattern(&versions, epk2_pattern) {
|
||||||
Some("epk2".to_string())
|
Some("epk2".to_string())
|
||||||
} else if match_with_pattern(&versions, epk3_pattern) {
|
} else if match_with_pattern(&versions, epk3_pattern) {
|
||||||
Some("epk3".to_string())
|
Some("epk3".to_string())
|
||||||
} else {
|
} else if match_with_pattern(&versions, epk3_new_pattern) {
|
||||||
|
Some("epk3".to_string())
|
||||||
|
}else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user