Check file magic

This commit is contained in:
NintenHero 2024-05-21 10:13:37 -05:00 committed by GitHub
parent 27cb277b0e
commit c6bef41191
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -17,7 +17,9 @@ namespace Ratalaika_Games_Spiller_Engine_Extractor
private static void Main(string[] args)
{
br = new BinaryReader(File.OpenRead(args[0]));
br.ReadChars(15);//"Ratalaika Games"
if (new string(br.ReadChars(15)) != "Ratalaika Games")
throw new Exception("This is not a Spiller Engine \"assets.rgf\" file.");
br.BaseStream.Position = 32;
int ZLibSize = br.ReadInt32();
int unknown1 = br.ReadInt32();