From c6bef41191d2bc9b42b3ceb2147cc322c35ea6ec Mon Sep 17 00:00:00 2001 From: NintenHero <37460517+MichaelHinrichs@users.noreply.github.com> Date: Tue, 21 May 2024 10:13:37 -0500 Subject: [PATCH] Check file magic --- Program.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Program.cs b/Program.cs index f44d327..37267fb 100644 --- a/Program.cs +++ b/Program.cs @@ -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();