fix(core): Fixes bad deserialization not skipping entry (#578)

This commit is contained in:
Kamron Batman 2021-04-18 20:46:54 -07:00 committed by GitHub
parent ad7f3b3b5c
commit 5e1ec5416d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -169,6 +169,8 @@ namespace Server
{
T t = entry.Entity;
var position = bin.Position;
// Skip this entry
if (t == null)
{
@ -219,7 +221,10 @@ namespace Server
{
throw new Exception("Deserialization failed.");
}
t.Delete();
// Skip this entry
bin.Seek(position + entry.Length, SeekOrigin.Begin);
}
}
}