aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-07-29 21:29:42 +0900
committernsfisis <nsfisis@gmail.com>2025-07-29 21:29:47 +0900
commit62d559bf2861c8de919e9a7659aa244f77ac2f1b (patch)
tree1b255781806f6b3bb4665b1a57d728246eb3acd6 /src
parent2fb2398a8218510e8ab764cd68caedcf51cf8124 (diff)
downloadphp-waddiwasi-62d559bf2861c8de919e9a7659aa244f77ac2f1b.tar.gz
php-waddiwasi-62d559bf2861c8de919e9a7659aa244f77ac2f1b.tar.zst
php-waddiwasi-62d559bf2861c8de919e9a7659aa244f77ac2f1b.zip
fix: Fix an issue where memory.grow does not modify memory's memtype
Diffstat (limited to 'src')
-rw-r--r--src/WebAssembly/Execution/MemInst.php6
1 files changed, 3 insertions, 3 deletions
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