Skip to content

Commit 9891d00

Browse files
committed
Revert pdb load simplification
1 parent 84f0371 commit 9891d00

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

TerrariaServerAPI/TerrariaApi.Server/ServerApi.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,9 @@ internal static void LoadPlugins()
350350
byte[] pe = null;
351351
try
352352
{
353-
var pdbPath = Path.ChangeExtension(fileInfo.FullName, ".pdb");
354-
assembly = Assembly.Load(pe = File.ReadAllBytes(fileInfo.FullName), File.Exists(pdbPath) ? File.ReadAllBytes(pdbPath) : null);
353+
var pdb = Path.ChangeExtension(fileInfo.FullName, ".pdb");
354+
var symbols = File.Exists(pdb) ? File.ReadAllBytes(pdb) : null;
355+
assembly = Assembly.Load(pe = File.ReadAllBytes(fileInfo.FullName), symbols);
355356
}
356357
catch (BadImageFormatException)
357358
{

0 commit comments

Comments
 (0)