Load debug symbols for mods if they are present

This commit is contained in:
Jean-Rémy Buchs
2017-03-04 14:20:16 +01:00
parent d3491c2979
commit 19616c059c

View File

@@ -55,14 +55,11 @@ namespace OpenRA
Assembly assembly;
if (!ResolvedAssemblies.TryGetValue(hash, out assembly))
{
using (Stream stream = modFiles.Open(path))
{
if (stream.GetType() == typeof(FileStream))
assembly = Assembly.LoadFile(((FileStream)stream).Name);
Stream debugStream = null;
if (modFiles.TryOpen(path + ".mdb", out debugStream))
assembly = Assembly.Load(data, debugStream.ReadAllBytes());
else
assembly = Assembly.Load(data);
}
ResolvedAssemblies.Add(hash, assembly);
}