Index: src/interpreter/bytecode-array-iterator.cc |
diff --git a/src/interpreter/bytecode-array-iterator.cc b/src/interpreter/bytecode-array-iterator.cc |
index b84215660e09bc3ed4eb469a882765ee896da537..542b505be7e70e25e4331d78c2bd9920761ff4c1 100644 |
--- a/src/interpreter/bytecode-array-iterator.cc |
+++ b/src/interpreter/bytecode-array-iterator.cc |
@@ -60,7 +60,11 @@ int8_t BytecodeArrayIterator::GetImmediateOperand(int operand_index) const { |
int BytecodeArrayIterator::GetCountOperand(int operand_index) const { |
- uint32_t operand = GetRawOperand(operand_index, OperandType::kCount8); |
+ OperandSize size = |
+ Bytecodes::GetOperandSize(current_bytecode(), operand_index); |
+ OperandType type = (size == OperandSize::kByte) ? OperandType::kCount8 |
+ : OperandType::kCount16; |
+ uint32_t operand = GetRawOperand(operand_index, type); |
return static_cast<int>(operand); |
} |