Update error message for bad table init

Although the string description for `TableOutOfBounds` isn't quite
matching what this error case is, it's a bit more descriptive than
`HeapOutOfBounds` anyway.
This commit is contained in:
Alex Crichton
2020-08-10 06:57:24 -07:00
parent 5f36d7eab7
commit bd8e08fe4a

View File

@@ -1300,7 +1300,7 @@ fn initialize_tables(instance: &Instance) -> Result<(), InstantiationError> {
.map_or(true, |end| end > table.size() as usize) .map_or(true, |end| end > table.size() as usize)
{ {
return Err(InstantiationError::Trap(Trap::wasm( return Err(InstantiationError::Trap(Trap::wasm(
ir::TrapCode::HeapOutOfBounds, ir::TrapCode::TableOutOfBounds,
))); )));
} }