mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-10 11:31:22 +00:00
Correct base calculation in anyref allocator
This `base` value is the raw value coming out of the first call to `table.grow`. Throwing in the addition of `JSIDX_RESERVED` just wasn't right!
This commit is contained in:
parent
6cc7e3dadf
commit
adde6c2da7
@ -39,7 +39,7 @@ impl Slab {
|
||||
internal_error("table grow failure")
|
||||
}
|
||||
if self.base == 0 {
|
||||
self.base = r as usize + (super::JSIDX_RESERVED as usize);
|
||||
self.base = r as usize;
|
||||
} else if self.base + self.data.len() != r as usize {
|
||||
internal_error("someone else allocated table entires?")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user