From 268ce5d9ddbb53d202e8f7d5d05271aae8b133dc Mon Sep 17 00:00:00 2001 From: pscott Date: Thu, 20 May 2021 10:54:34 +0200 Subject: [PATCH] Fix uint256_to_decimal --- ethereum-plugin-sdk | 2 +- src/utils.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ethereum-plugin-sdk b/ethereum-plugin-sdk index 44bab0d..8ed5066 160000 --- a/ethereum-plugin-sdk +++ b/ethereum-plugin-sdk @@ -1 +1 @@ -Subproject commit 44bab0dda2792fe35c9e0a252a01bd3b615d8523 +Subproject commit 8ed5066fb4e83a481ed2903deff013754fae8939 diff --git a/src/utils.c b/src/utils.c index 8bdb76f..401de81 100644 --- a/src/utils.c +++ b/src/utils.c @@ -81,7 +81,7 @@ bool uint256_to_decimal(const uint8_t *value, size_t value_len, char *out, size_ uint16_t n[16] = {0}; // Copy and right-align the number - memcpy((uint8_t *) n + INT256_LENGTH - value_len, value, INT256_LENGTH - value_len); + memcpy((uint8_t *) n + INT256_LENGTH - value_len, value, value_len); // Special case when value is 0 if (allzeroes(n, INT256_LENGTH)) {