From 6ce175041a0014015d601d23ec03cca12e6109fc Mon Sep 17 00:00:00 2001 From: BTChip github Date: Wed, 3 Oct 2018 18:22:38 +0200 Subject: [PATCH] Fix contract data parsing --- Makefile | 2 +- src_genericwallet/main.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3b86fdc..2b322e8 100755 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ APP_LOAD_PARAMS= --curve secp256k1 $(COMMON_LOAD_PARAMS) APPVERSION_M=1 APPVERSION_N=1 -APPVERSION_P=5 +APPVERSION_P=6 APPVERSION=$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P) APP_LOAD_FLAGS= --appFlags 0x40 --dep Ethereum:$(APPVERSION) diff --git a/src_genericwallet/main.c b/src_genericwallet/main.c index 4322591..c2c4748 100644 --- a/src_genericwallet/main.c +++ b/src_genericwallet/main.c @@ -1641,7 +1641,10 @@ customStatus_e customProcessor(txContext_t *context) { blockSize = 4; } else { - blockSize = 32 - dataContext.rawDataContext.fieldOffset; + if (!N_storage.contractDetails) { + return CUSTOM_NOT_HANDLED; + } + blockSize = 32 - (dataContext.rawDataContext.fieldOffset % 32); } // Sanity check