* fixed another WebAssembly compilation error with -CR

git-svn-id: trunk@48966 -
This commit is contained in:
nickysn 2021-03-14 15:06:13 +00:00
parent 0d1fb41901
commit f0aed5d355

View File

@ -1832,7 +1832,10 @@ implementation
realresdef: tdef;
ft: TWasmFuncType;
begin
ft:=tcpuprocdef(pd).create_functype;
if pd.typ=procvardef then
ft:=tcpuprocvardef(pd).create_functype
else
ft:=tcpuprocdef(pd).create_functype;
totalremovesize:=Length(ft.params)-Length(ft.results);
if (Length(ft.results)=0) and (po_discardresult in pd.procoptions) then
dec(totalremovesize);