aboutsummaryrefslogtreecommitdiff
path: root/src/mnemonics/electrum-words.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-06-22 16:47:07 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-06-22 16:47:07 +0100
commitbb708ab8c307dfc98fbadd09c6a0ceee098e4e1b (patch)
treec06bf38571adc8ec16c4c53564ce754c66e9b7e2 /src/mnemonics/electrum-words.cpp
parentMerge pull request #2087 (diff)
downloadmonero-bb708ab8c307dfc98fbadd09c6a0ceee098e4e1b.tar.xz
electrum-words: fix seed mistakenly thought to be old style
It'd see "empty" words due to extraneous spaces
Diffstat (limited to 'src/mnemonics/electrum-words.cpp')
-rw-r--r--src/mnemonics/electrum-words.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mnemonics/electrum-words.cpp b/src/mnemonics/electrum-words.cpp
index ef1100a10..3b1dc53d7 100644
--- a/src/mnemonics/electrum-words.cpp
+++ b/src/mnemonics/electrum-words.cpp
@@ -422,10 +422,11 @@ namespace crypto
* \param seed The seed to check (a space delimited concatenated word list)
* \return true if the seed passed is a old style seed false if not.
*/
- bool get_is_old_style_seed(const std::string &seed)
+ bool get_is_old_style_seed(std::string seed)
{
std::vector<std::string> word_list;
- boost::split(word_list, seed, boost::is_any_of(" "));
+ boost::algorithm::trim(seed);
+ boost::split(word_list, seed, boost::is_any_of(" "), boost::token_compress_on);
return word_list.size() != (seed_length + 1);
}