Skip to content

Commit 48f7714

Browse files
Improved RLP elements parsing
1 parent 8c8c87e commit 48f7714

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/features/signTx/ethUstream.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,9 @@ static bool processChainID(txContext_t *context) {
175175
if (context->currentFieldPos < context->currentFieldLength) {
176176
uint32_t copySize =
177177
MIN(context->commandLength, context->currentFieldLength - context->currentFieldPos);
178-
if (copyTxData(context, context->content->chainID.value, copySize) == false) {
178+
if (copyTxData(context,
179+
context->content->chainID.value + context->currentFieldPos,
180+
copySize) == false) {
179181
return false;
180182
}
181183
}
@@ -195,7 +197,9 @@ static bool processNonce(txContext_t *context) {
195197
if (context->currentFieldPos < context->currentFieldLength) {
196198
uint32_t copySize =
197199
MIN(context->commandLength, context->currentFieldLength - context->currentFieldPos);
198-
if (copyTxData(context, context->content->nonce.value, copySize) == false) {
200+
if (copyTxData(context,
201+
context->content->nonce.value + context->currentFieldPos,
202+
copySize) == false) {
199203
return false;
200204
}
201205
}

0 commit comments

Comments
 (0)