Explorar o código

* fixed the value passing of record parameters with non-scalar value size on the
WebAssembly target

git-svn-id: trunk@49218 -

nickysn %!s(int64=4) %!d(string=hai) anos
pai
achega
dbecb67d45
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      compiler/wasm32/cpupara.pas

+ 1 - 1
compiler/wasm32/cpupara.pas

@@ -99,7 +99,7 @@ implementation
           recorddef :
           recorddef :
             begin
             begin
               { Delphi stdcall passes records on the stack for call by value }
               { Delphi stdcall passes records on the stack for call by value }
-              result:=(varspez=vs_const) or (def.size=0);
+              result:=(varspez=vs_const) or (not (def.size in [1,2,4,8]));
             end;
             end;
           arraydef :
           arraydef :
             begin
             begin