[Mono-devel-list] off by one error in MonoSymbolFile:GetMethodByToken

Varga Zoltan vargaz at freemail.hu
Mon Jun 9 03:52:13 EDT 2003


                                            Hi,

  There seem to be an off-by-one error in the above method. The
following patch fixes it:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Index: MonoSymbolFile.cs
===================================================================
RCS file:
/cvs/public/mcs/class/Mono.CSharp.Debugger/MonoSymbolFile.cs,v
retrieving revision 1.13
diff -u -3 -p -u -r1.13 MonoSymbolFile.cs
--- MonoSymbolFile.cs   23 Feb 2003 13:30:34 -0000      1.13
+++ MonoSymbolFile.cs   9 Jun 2003 07:59:24 -0000
@@ -430,7 +430,7 @@ namespace Mono.CSharp.Debugger
                                for (int i = 0; i <
MethodCount; i++) {
                                        MethodIndexEntry ie
= GetMethodIndexEntry (i + 1);

-                                      
method_token_hash.Add (ie.Token, i);
+                                      
method_token_hash.Add (ie.Token, i + 1);
                                }
                        }
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Is this OK to check-in ?

              Zoltan






More information about the Mono-devel-list mailing list