diff --git a/libs/remix-debug/src/solidity-decoder/types/Mapping.ts b/libs/remix-debug/src/solidity-decoder/types/Mapping.ts index b8d1623cac..acb11e454d 100644 --- a/libs/remix-debug/src/solidity-decoder/types/Mapping.ts +++ b/libs/remix-debug/src/solidity-decoder/types/Mapping.ts @@ -38,7 +38,7 @@ export class Mapping extends RefType { decodeFromMemoryInternal (offset, memory) { // mappings can only exist in storage and not in memory // so this should never be called - return { value: '', length: '0x', type: this.typeName } + return { value: '', length: '0x0', type: this.typeName } } async decodeMappingsLocation (preimages, location, storageResolver) { diff --git a/libs/remix-debug/src/solidity-decoder/types/Struct.ts b/libs/remix-debug/src/solidity-decoder/types/Struct.ts index d71c43652c..f6ea2748bc 100644 --- a/libs/remix-debug/src/solidity-decoder/types/Struct.ts +++ b/libs/remix-debug/src/solidity-decoder/types/Struct.ts @@ -1,6 +1,7 @@ 'use strict' import { add } from './util' import { RefType } from './RefType' +import { Mapping } from './Mapping' export class Struct extends RefType { members @@ -33,7 +34,7 @@ export class Struct extends RefType { var contentOffset = offset var member = item.type.decodeFromMemory(contentOffset, memory) ret[item.name] = member - offset += 32 + if (!(item.type instanceof Mapping)) offset += 32 }) return { value: ret, type: this.typeName } }