From ed153a1720e94e636481d3e10e90f419719e37e5 Mon Sep 17 00:00:00 2001 From: Diego Frias Date: Sun, 18 Aug 2024 10:56:25 -0700 Subject: [PATCH] LibWasm: Grow table type in `table.grow` --- Userland/Libraries/LibWasm/AbstractMachine/AbstractMachine.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Userland/Libraries/LibWasm/AbstractMachine/AbstractMachine.h b/Userland/Libraries/LibWasm/AbstractMachine/AbstractMachine.h index 3d807043914..9830aec314e 100644 --- a/Userland/Libraries/LibWasm/AbstractMachine/AbstractMachine.h +++ b/Userland/Libraries/LibWasm/AbstractMachine/AbstractMachine.h @@ -408,6 +408,9 @@ public: return false; for (size_t i = previous_size; i < m_elements.size(); ++i) m_elements[i] = fill_value; + + m_type = TableType { m_type.element_type(), Limits(m_type.limits().min() + size_to_grow, m_type.limits().max()) }; + return true; }