Skip to content

Commit b292984

Browse files
committed
Fix
1 parent bba58b6 commit b292984

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/vm/src/imports.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,9 +829,9 @@ pub fn do_debug<A: BackendApi + 'static, S: Storage + 'static, Q: Querier + 'sta
829829
let (data, mut store) = env.data_and_store_mut();
830830

831831
charge_host_call_gas(data, &mut store)?;
832+
let message_data = read_region(data, &mut store, message_ptr, MAX_LENGTH_DEBUG)?;
832833

833834
if let Some(debug_handler) = data.debug_handler() {
834-
let message_data = read_region(data, &mut store, message_ptr, MAX_LENGTH_DEBUG)?;
835835
let msg = String::from_utf8_lossy(&message_data);
836836
let gas_remaining = data.get_gas_left(&mut store);
837837
debug_handler.borrow_mut()(

packages/vm/src/instance.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,7 @@ mod tests {
914914

915915
let report2 = instance.create_gas_report();
916916
assert_eq!(report2.used_externally, 251);
917-
assert_eq!(report2.used_internally, 22432500);
917+
assert_eq!(report2.used_internally, 22634225);
918918
assert_eq!(report2.limit, LIMIT);
919919
assert_eq!(
920920
report2.remaining,
@@ -1105,7 +1105,7 @@ mod tests {
11051105
.unwrap();
11061106

11071107
let init_used = orig_gas - instance.get_gas_left();
1108-
assert_eq!(init_used, 22432751);
1108+
assert_eq!(init_used, 22634476);
11091109
}
11101110

11111111
#[test]

0 commit comments

Comments
 (0)