Pārlūkot izejas kodu

Add ToString methods for the instruction types, to help debugging comprehension.
Fix out-by-one error in reading parameter names in Reading metadata.
Workaround for non-conforming array loBound metadata from SpecSharp2 output.

k_john_gough_cp 15 gadi atpakaļ
vecāks
revīzija
1cc62a2474
3 mainītis faili ar 1324 papildinājumiem un 1514 dzēšanām
  1. 1320 1512
      PERWAPI/Instructions.cs
  2. 1 1
      PERWAPI/MDMethodElems.cs
  3. 3 1
      PERWAPI/PEReader.cs

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1320 - 1512
PERWAPI/Instructions.cs


+ 1 - 1
PERWAPI/MDMethodElems.cs

@@ -691,7 +691,7 @@ namespace QUT.PERWAPI
             if (sig == null) sig = buff.ReadMethSig(this, sigIx);
             sig.name = name;
             parList = new Param[sig.numPars];
-            if (parIx >= buff.GetTableSize(MDTable.Param))
+            if (parIx > buff.GetTableSize(MDTable.Param))
             {
                 // EXPERIMENTAL kjg 19 November 2007
                 //  It is actually allowed that a method def does not

+ 3 - 1
PERWAPI/PEReader.cs

@@ -1231,7 +1231,9 @@ namespace QUT.PERWAPI
                     //                          
                     if (numLoBounds > 0)
                     {
-                        loBounds = new int[numLoBounds];
+                      int constraint = (numLoBounds < numSizes ? numSizes : numLoBounds);
+                      loBounds = new int[constraint];
+                        //loBounds = new int[numLoBounds];
                         for (int i = 0; i < numLoBounds; i++)
                             loBounds[i] = blob.ReadCompressedInt();
                         if (numSizes > 0)

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels