@@ -80,20 +80,25 @@ public class AlphaROM : IDiskImageCheck<ISO9660>, IExecutableCheck<PortableExecu
8080 // to only consist of capital letters and numbers, a basic byte value check can be performed to ensure
8181 // at least 5 bytes are numbers and 5 bytes are letters. Unfortunately, there doesn't seem to be quite
8282 // enough of a pattern to have a better check than this, but it works well enough.
83- if ( applicationIdentifierString . Length == 18
83+ if ( applicationIdentifierString . Length == 18
8484 && Array . FindAll ( applicationIdentifierStringBytes , b => b < 60 ) . Length >= 5
8585 && Array . FindAll ( applicationIdentifierStringBytes , b => b > 60 ) . Length >= 5 )
86+ {
8687 return "AlphaROM" ;
88+ }
8789
8890 // Type #2: Usually 20 characters long, but Redump ID 124334 is 18 characters long. Validate that it
8991 // starts with YYYYMMDD, followed by 6-8 more numbers, followed by letters.
9092 if ( applicationIdentifierString . Length >= 18 && applicationIdentifierString . Length <= 20 )
9193 {
9294 if ( Int32 . TryParse ( applicationIdentifierString . Substring ( 0 , 4 ) , out int year ) == false
93- || Int32 . TryParse ( applicationIdentifierString . Substring ( 4 , 2 ) , out int month ) == false
94- || Int32 . TryParse ( applicationIdentifierString . Substring ( 6 , 2 ) , out int day ) == false
95- || Int32 . TryParse ( applicationIdentifierString . Substring ( 8 , 6 ) , out int extraTime ) == false )
95+ || Int32 . TryParse ( applicationIdentifierString . Substring ( 4 , 2 ) , out int month ) == false
96+ || Int32 . TryParse ( applicationIdentifierString . Substring ( 6 , 2 ) , out int day ) == false
97+ || Int32 . TryParse ( applicationIdentifierString . Substring ( 8 , 6 ) , out int extraTime ) == false )
98+ {
9699 return null ;
100+ }
101+
97102 if ( year >= 2009 || year < 2000 || month > 12 || day > 31 )
98103 return null ;
99104
0 commit comments