Browse Source

* changed op2strtype to have a large enough string to hold the instruction and
use that type for wasm_op2str in itcpuwasm

git-svn-id: branches/wasm@46667 -

nickysn 5 years ago
parent
commit
bd72084939
2 changed files with 2 additions and 2 deletions
  1. 1 1
      compiler/wasm32/cpubase.pas
  2. 1 1
      compiler/wasm32/itcpuwasm.pas

+ 1 - 1
compiler/wasm32/cpubase.pas

@@ -88,7 +88,7 @@ uses
       TWasmBasicType = (wbt_i32, wbt_i64, wbt_f32, wbt_f64);
       TWasmBasicType = (wbt_i32, wbt_i64, wbt_f32, wbt_f64);
 
 
       {# This should define the array of instructions as string }
       {# This should define the array of instructions as string }
-      op2strtable=array[tasmop] of string[8];
+      op2strtable=array[tasmop] of string[31];
 
 
     Const
     Const
       {# First value of opcode enumeration }
       {# First value of opcode enumeration }

+ 1 - 1
compiler/wasm32/itcpuwasm.pas

@@ -29,7 +29,7 @@ interface
       cpubase,cgbase;
       cpubase,cgbase;
 
 
     const
     const
-      wasm_op2str : array[tasmop] of string[31] = ( '<none>',
+      wasm_op2str : op2strtable = ( '<none>',
         // control flow
         // control flow
         'block', 'loop', 'br', 'br_if', 'br_table', 'if', 'else', 'end',
         'block', 'loop', 'br', 'br_if', 'br_table', 'if', 'else', 'end',
         'return', 'unreachable',
         'return', 'unreachable',