Skip to content

Commit f0e45bf

Browse files
committed
Update plugin PDB loading
1 parent 000bd23 commit f0e45bf

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

TerrariaServerAPI/TerrariaApi.Server/ServerApi.cs

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

0 commit comments

Comments
 (0)