Skip to content
This repository was archived by the owner on Sep 22, 2021. It is now read-only.

Commit 0389f60

Browse files
authored
Check if it's a CSGO demo
Must be verified, edited from my smartphone :p
1 parent 3d28ea9 commit 0389f60

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

DemoInfo/DemoParser.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,9 @@ public void ParseHeader()
501501
if (header.Filestamp != "HL2DEMO")
502502
throw new InvalidDataException("Invalid File-Type - expecting HL2DEMO");
503503

504+
if (header.GameDirectory != "csgo")
505+
throw new InvalidDataException("Invalid Demo-Game");
506+
504507
if (header.Protocol != 4)
505508
throw new InvalidDataException("Invalid Demo-Protocol");
506509

0 commit comments

Comments
 (0)