From c85c2fcfe9bcf012aaba51172e317c8318bed4f9 Mon Sep 17 00:00:00 2001 From: practicalswift Date: Mon, 5 Mar 2018 17:55:12 +0100 Subject: [PATCH] Fix conversion order --- bitcoin/signature.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitcoin/signature.c b/bitcoin/signature.c index 4de412dea..3f2dc18da 100644 --- a/bitcoin/signature.c +++ b/bitcoin/signature.c @@ -197,7 +197,7 @@ static bool IsValidSignatureEncoding(const unsigned char sig[], size_t len) // Verify that the length of the signature matches the sum of the length // of the elements. - if ((size_t)(lenR + lenS + 7) != len) return false; + if ((size_t)lenR + (size_t)lenS + 7 != len) return false; // Check whether the R element is an integer. if (sig[2] != 0x02) return false;