don't try to decode invalid encoded ext keys

This commit is contained in:
Jonas Schnelli committed 2015-07-25 09:51:52 +02:00
1 parent 8d2af54ecc
commit 6f8b6d339b
1 file changed
+4 -1
+4 -1
View File
@@ -146,7 +146,10 @@ public:
K GetKey() {
K ret;
ret.Decode(&vchData[0]);
if (vchData.size() == Size) {
//if base58 encouded data not holds a ext key, return a !IsValid() key
ret.Decode(&vchData[0]);
}
return ret;
}