Explorar el Código

* i386 callback implementation: only skip the result argument if it was detected as one from the parameters

Sven/Sarah Barth hace 3 años
padre
commit
e95572921a
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      packages/rtl-objpas/src/i386/invoke.inc

+ 3 - 1
packages/rtl-objpas/src/i386/invoke.inc

@@ -745,8 +745,10 @@ var
   td: PTypeData;
   i, c, argcount, stackcount, idx, argidx: SizeInt;
   stackargs: array of SizeInt;
+  orgresinparam: Boolean;
 begin
   fResultInParam := ReturnResultInParam(fResultType);
+  orgresinparam := fResultInParam;
 
   genofs := 0;
   stackofs := 0;
@@ -776,7 +778,7 @@ begin
     else
       c := stackcount - 1;
     for i := 0 to c do begin
-      if argidx = fResultIdx then
+      if (argidx = fResultIdx) and orgresinparam then
         Inc(argidx);
       if pfResult in fArgs[i].ParamFlags then begin
         fResultIdx := argidx;