Browse Source

[PATCH 162/188] always write signed operator for i32

From 1ac59a5f09dfcecfd0a3e25917399716b5326042 Mon Sep 17 00:00:00 2001
From: Dmitry Boyarintsev <[email protected]>
Date: Fri, 27 Mar 2020 10:15:06 -0400

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

+ 5 - 3
utils/wasmbin/wasmbinwriter.pas

@@ -613,9 +613,11 @@ var
   u32 : LongWord;
   u32 : LongWord;
 begin
 begin
   Val(operand, i32, err);
   Val(operand, i32, err);
-  if err = 0 then
-    u32 := LongWord(i32)
-  else
+  if err = 0 then begin
+    WriteS( dst, i32, sizeof(i32));
+    Result := true;
+    Exit;
+  end else
     Val(operand, u32, err);
     Val(operand, u32, err);
 
 
   Result := (err = 0);
   Result := (err = 0);