Browse Source

Fix usage of good old objects with VMT.

symdef.pas, tobjectdef:
  * vmtmethodoffset: the "else" part of the case is intended for odt_object, so revert to "2" instead of "3"

git-svn-id: branches/svenbarth/arc@28913 -
svenbarth 10 years ago
parent
commit
83375bf566
1 changed files with 3 additions and 3 deletions
  1. 3 3
      compiler/symdef.pas

+ 3 - 3
compiler/symdef.pas

@@ -6420,11 +6420,11 @@ implementation
           { invalid }
           { invalid }
           vmtmethodoffset:=-1;
           vmtmethodoffset:=-1;
         else
         else
-          { the +3*sizeof(pint) is size, -size and refcount offset }
+          { the +2*sizeof(pint) is size, -size and refcount offset }
 {$ifdef WITHDMT}
 {$ifdef WITHDMT}
-          vmtmethodoffset:=index*voidcodepointertype.size+2*voidpointertype.size+3*sizeof(pint);
+          vmtmethodoffset:=index*voidcodepointertype.size+2*voidpointertype.size+2*sizeof(pint);
 {$else WITHDMT}
 {$else WITHDMT}
-          vmtmethodoffset:=index*voidcodepointertype.size+1*voidpointertype.size+3*sizeof(pint);
+          vmtmethodoffset:=index*voidcodepointertype.size+1*voidpointertype.size+2*sizeof(pint);
 {$endif WITHDMT}
 {$endif WITHDMT}
         end;
         end;
       end;
       end;