From a83c1c3286c4b16a7d2bf16900befb3651fb195a Mon Sep 17 00:00:00 2001 From: mhw0 Date: Sun, 8 Oct 2023 11:29:54 +0500 Subject: [PATCH] abi: do not ignore function selector offset on decode (#34) --- src/abi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/abi.c b/src/abi.c index 82c18cf..9c68c53 100644 --- a/src/abi.c +++ b/src/abi.c @@ -177,6 +177,7 @@ int eth_abi_array(struct eth_abi *abi, uint64_t *len) { if (abi->m == ETH_ABI_DECODE) { ethc_abi_buf_pr64(dyoffset, cframebuf, cframebuf->offset); + dyoffset = cframebuf->offset % 32 != 0 ? dyoffset + 4 : dyoffset; ethc_abi_buf_pr64(framelen, cframebuf, dyoffset); nframebuf = (struct ethc_abi_buf*)malloc(sizeof(struct ethc_abi_buf));