mirror of
https://github.com/RPCS3/llvm.git
synced 2026-08-25 11:51:41 -04:00
[WebAssembly] Read global index in init expression as LEB
Subscribers: jfb, dschuff Differential Revision: https://reviews.llvm.org/D32462 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301330 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -144,7 +144,7 @@ static Error readInitExpr(wasm::WasmInitExpr &Expr, const uint8_t *&Ptr) {
|
||||
Expr.Value.Float64 = readFloat64(Ptr);
|
||||
break;
|
||||
case wasm::WASM_OPCODE_GET_GLOBAL:
|
||||
Expr.Value.Global = readUint32(Ptr);
|
||||
Expr.Value.Global = readULEB128(Ptr);
|
||||
break;
|
||||
default:
|
||||
return make_error<GenericBinaryError>("Invalid opcode in init_expr",
|
||||
|
||||
Reference in New Issue
Block a user