From 62d559bf2861c8de919e9a7659aa244f77ac2f1b Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 29 Jul 2025 21:29:42 +0900 Subject: fix: Fix an issue where memory.grow does not modify memory's memtype --- src/WebAssembly/Execution/MemInst.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/WebAssembly') diff --git a/src/WebAssembly/Execution/MemInst.php b/src/WebAssembly/Execution/MemInst.php index e93e79b..f5733e6 100644 --- a/src/WebAssembly/Execution/MemInst.php +++ b/src/WebAssembly/Execution/MemInst.php @@ -86,11 +86,11 @@ final class MemInst return -1; } - $limits = $this->type->limits; - $limits_ = new Limits($len, $limits->max); - if (!$limits_->isValid()) { + $limits = new Limits($len, $this->type->limits->max); + if (!$limits->isValid()) { return -1; } + $this->type = new MemType($limits); $originalSize = $this->size(); // @phpstan-ignore-next-line -- cgit v1.2.3-70-g09d2