Browse Source

LibWasm: Make memory_grow validation push back the old memory size

Ali Mohammad Pur 3 years ago
parent
commit
6760ea33a0
1 changed files with 1 additions and 0 deletions
  1. 1 0
      Userland/Libraries/LibWasm/AbstractMachine/Validator.cpp

+ 1 - 0
Userland/Libraries/LibWasm/AbstractMachine/Validator.cpp

@@ -1873,6 +1873,7 @@ VALIDATE_INSTRUCTION(memory_grow)
 {
     TRY(validate(MemoryIndex { 0 }));
     TRY((stack.take<ValueType::I32>()));
+    stack.append(ValueType(ValueType::I32));
 
     return {};
 }