From 3983c76adbfae0e25b234283f4f026ee3260a8a0 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Thu, 30 May 2013 12:12:11 -0700 Subject: [PATCH] Fix default alphabet parameter to not pass null --- modules/ripple_data/crypto/ripple_Base58.cpp | 4 ++-- modules/ripple_data/types/ripple_RippleAddress.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/ripple_data/crypto/ripple_Base58.cpp b/modules/ripple_data/crypto/ripple_Base58.cpp index fc0fbb0baa..e8af246bcf 100644 --- a/modules/ripple_data/crypto/ripple_Base58.cpp +++ b/modules/ripple_data/crypto/ripple_Base58.cpp @@ -158,8 +158,8 @@ bool Base58::decode (const std::string& str, std::vector& vchRet) bool Base58::decodeWithCheck (const char* psz, std::vector& vchRet, const char* pAlphabet) { - if (pAlphabet == NULL) - pAlphabet = s_currentAlphabet; + assert (pAlphabet != NULL); + if (!decode (psz, vchRet, pAlphabet)) return false; if (vchRet.size() < 4) diff --git a/modules/ripple_data/types/ripple_RippleAddress.h b/modules/ripple_data/types/ripple_RippleAddress.h index dbbcb4935d..4a2ff7d03d 100644 --- a/modules/ripple_data/types/ripple_RippleAddress.h +++ b/modules/ripple_data/types/ripple_RippleAddress.h @@ -71,7 +71,7 @@ public: std::string humanAccountID() const; - bool setAccountID(const std::string& strAccountID, const char* pAlphabet=0); + bool setAccountID(const std::string& strAccountID, const char* pAlphabet=Base58::getCurrentAlphabet ()); void setAccountID(const uint160& hash160In); static RippleAddress createAccountID(const std::string& strAccountID)