summaryrefslogtreecommitdiff
path: root/crates/tinywasm/src/store/gc/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/tinywasm/src/store/gc/mod.rs')
-rw-r--r--crates/tinywasm/src/store/gc/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/tinywasm/src/store/gc/mod.rs b/crates/tinywasm/src/store/gc/mod.rs
index 2a87a5f..6431037 100644
--- a/crates/tinywasm/src/store/gc/mod.rs
+++ b/crates/tinywasm/src/store/gc/mod.rs
@@ -79,7 +79,7 @@ pub(crate) fn decode_data(
return Err(Trap::MemoryOutOfBounds { offset: src, len: len.saturating_mul(width), max: data.len() });
};
let mut values = Vec::new();
- values.try_reserve_exact(len).map_err(|_| Trap::OutOfMemory)?;
+ cold_err!(values.try_reserve_exact(len)).map_err(|_| Trap::OutOfMemory)?;
values.extend(data[src..end].chunks_exact(width).map(|bytes| match width {
1 => TinyWasmValue::Value32(u32::from(bytes[0])),
2 => TinyWasmValue::Value32(u32::from(u16::from_le_bytes(bytes.try_into().unwrap()))),