Browse Source

[PATCH 071/188] fix parameters and result writeout

From a37869979cd8c437eed122205317b1eeb5d1148a Mon Sep 17 00:00:00 2001
From: Dmitry Boyarintsev <[email protected]>
Date: Thu, 5 Mar 2020 09:47:40 -0500

git-svn-id: branches/wasm@46067 -
nickysn 5 years ago
parent
commit
e0621577f4
1 changed files with 2 additions and 2 deletions
  1. 2 2
      utils/wasmbin/wasmbinwriter.pas

+ 2 - 2
utils/wasmbin/wasmbinwriter.pas

@@ -291,11 +291,11 @@ begin
 
 
     WriteU32(dst, tp.ParamCount);
     WriteU32(dst, tp.ParamCount);
     for j:=0 to tp.ParamCount-1 do
     for j:=0 to tp.ParamCount-1 do
-      dst.WriteByte(tp.GetParam(i).tp);
+      dst.WriteByte(tp.GetParam(j).tp);
 
 
     WriteU32(dst, tp.ResultCount);
     WriteU32(dst, tp.ResultCount);
     for j:=0 to tp.ResultCount-1 do
     for j:=0 to tp.ResultCount-1 do
-      dst.WriteByte(tp.GetResult(i).tp);
+      dst.WriteByte(tp.GetResult(j).tp);
   end;
   end;
   SectionEnd(sc);
   SectionEnd(sc);
 end;
 end;