Browse Source

* Avoid range error in comparisons

Michaël Van Canneyt 2 years ago
parent
commit
c39e51485c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      rtl/inc/objpas.inc

+ 2 - 2
rtl/inc/objpas.inc

@@ -548,7 +548,7 @@ end;
 
 
         var
         var
            methodtable : pmethodnametable;
            methodtable : pmethodnametable;
-           i : dword;
+           i : longint; // in case count=0
            ovmt : PVmt;
            ovmt : PVmt;
 
 
         begin
         begin
@@ -574,7 +574,7 @@ end;
       class function TObject.MethodName(address : codepointer) : shortstring;
       class function TObject.MethodName(address : codepointer) : shortstring;
         var
         var
            methodtable : pmethodnametable;
            methodtable : pmethodnametable;
-           i : dword;
+           i : longint; // in case count=0
            ovmt : PVmt;
            ovmt : PVmt;
         begin
         begin
            ovmt:=PVmt(self);
            ovmt:=PVmt(self);