All pastes #934486 Raw Edit

Unnamed

public text v1 · immutable
·published 2008-03-08 21:54 UTC
rendered paste body
Index: Mono.Cecil.Mdb/MdbReader.cs
===================================================================
--- Mono.Cecil.Mdb/MdbReader.cs (revision 97341)
+++ Mono.Cecil.Mdb/MdbReader.cs (working copy)
@@ -92,12 +92,13 @@

                void ReadLineNumbers (MethodEntry entry, Hashtable instructions)
                {
+                       Document doc = GetDocument (entry.SourceFile);
+
                        foreach (LineNumberEntry line in entry.LineNumbers) {
                                Instruction instr = instructions [line.Offset] as Instruction;
                                if (instr == null)
                                        continue;

-                               Document doc = GetDocument (entry.SourceFile);
                                instr.SequencePoint = new SequencePoint (doc);
                                instr.SequencePoint.StartLine = line.Row;
                                instr.SequencePoint.EndLine = line.Row;