From 7499efecf61bb9475d9c2187bbfe53d9d37421d1 Mon Sep 17 00:00:00 2001 From: Nikolay Volf Date: Wed, 24 May 2017 12:53:02 +0300 Subject: [PATCH] fix from/into electum bug (#5686) --- ethkey/src/signature.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethkey/src/signature.rs b/ethkey/src/signature.rs index bb73581e6..91fe3e2a3 100644 --- a/ethkey/src/signature.rs +++ b/ethkey/src/signature.rs @@ -54,7 +54,7 @@ impl Signature { /// Parse bytes as a signature encoded as RSV (V in "Electrum" notation). /// May return empty (invalid) signature if given data has invalid length. pub fn from_electrum(data: &[u8]) -> Self { - if data.len() != 65 || data[0] < 27 { + if data.len() != 65 || data[64] < 27 { // fallback to empty (invalid) signature return Signature::default(); }