mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
(AutoEntry): don't return file type for ambiguously detected files.
This commit is contained in:
@@ -61,7 +61,10 @@ namespace GameRes.Formats
|
|||||||
return new AutoEntry (base_name, () => {
|
return new AutoEntry (base_name, () => {
|
||||||
uint signature = file.View.ReadUInt32 (offset);
|
uint signature = file.View.ReadUInt32 (offset);
|
||||||
if (0 == signature) return null;
|
if (0 == signature) return null;
|
||||||
return FormatCatalog.Instance.LookupSignature (signature).FirstOrDefault();
|
var res = FormatCatalog.Instance.LookupSignature (signature);
|
||||||
|
if (!res.Any() || res.Skip (1).Any()) // Count == 0 || Count > 1
|
||||||
|
return null;
|
||||||
|
return res.First();
|
||||||
}) { Offset = offset };
|
}) { Offset = offset };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user