mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
Don't support old replays to prevent the replay browser from crashing
This commit is contained in:
parent
0face52d90
commit
82081b3698
1 changed files with 8 additions and 0 deletions
|
|
@ -442,6 +442,10 @@ class Replay {
|
|||
Console.log("Replay loading failed: unknown version");
|
||||
return false;
|
||||
}
|
||||
if (replayVersion < 5) { // first version with headers
|
||||
Console.log('Replay loading failed: version ${replayVersion} does not have a header');
|
||||
return false;
|
||||
}
|
||||
var nameLength = data.get(1);
|
||||
this.name = data.getString(2, nameLength);
|
||||
var missionLength = data.get(2 + nameLength);
|
||||
|
|
@ -475,6 +479,10 @@ class Replay {
|
|||
Console.log("Replay loading failed: unknown version");
|
||||
return false;
|
||||
}
|
||||
if (replayVersion < 5) { // first version with headers
|
||||
Console.log('Replay loading failed: version ${replayVersion} does not have a header');
|
||||
return false;
|
||||
}
|
||||
var nameLength = data.get(1);
|
||||
this.name = data.getString(2, nameLength);
|
||||
var missionLength = data.get(2 + nameLength);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue