Browse Source

* fixed methodname/address: the loops must go from 0 to ...^.count-1

florian 26 years ago
parent
commit
8e642be78a
1 changed files with 6 additions and 3 deletions
  1. 6 3
      rtl/inc/objpas.inc

+ 6 - 3
rtl/inc/objpas.inc

@@ -141,7 +141,7 @@
                 methodtable:=pmethodnametable((Pointer(c)+vmtMethodTable)^);
                 methodtable:=pmethodnametable((Pointer(c)+vmtMethodTable)^);
                 if assigned(methodtable) then
                 if assigned(methodtable) then
                   begin
                   begin
-                     for i:=1 to methodtable^.count do
+                     for i:=0 to methodtable^.count-1 do
                        if methodtable^.entries[i].name^=name then
                        if methodtable^.entries[i].name^=name then
                          begin
                          begin
                             MethodAddress:=methodtable^.entries[i].addr;
                             MethodAddress:=methodtable^.entries[i].addr;
@@ -167,7 +167,7 @@
                 methodtable:=pmethodnametable((Pointer(c)+vmtMethodTable)^);
                 methodtable:=pmethodnametable((Pointer(c)+vmtMethodTable)^);
                 if assigned(methodtable) then
                 if assigned(methodtable) then
                   begin
                   begin
-                     for i:=1 to methodtable^.count do
+                     for i:=0 to methodtable^.count-1 do
                        if methodtable^.entries[i].addr=address then
                        if methodtable^.entries[i].addr=address then
                          begin
                          begin
                             MethodName:=methodtable^.entries[i].name^;
                             MethodName:=methodtable^.entries[i].name^;
@@ -405,7 +405,10 @@
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.10  1999-09-12 14:53:26  florian
+  Revision 1.11  1999-09-15 20:28:35  florian
+    * fixed methodname/address: the loops must go from 0 to ...^.count-1
+
+  Revision 1.10  1999/09/12 14:53:26  florian
     + tobject.methodaddress und tobject.methodname durchsucht nun auch
     + tobject.methodaddress und tobject.methodname durchsucht nun auch
       die Elternklassen
       die Elternklassen