diff options
author | luigi1111 <luigi1111w@gmail.com> | 2018-08-23 14:04:26 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2018-08-23 14:04:26 -0500 |
commit | 91c7d68b2d476c86e8ba710ccac6f3c64b91f1a5 (patch) | |
tree | 1e0c0ac96b76f1887a9de4e0232c8899392a4ffe | |
parent | Merge pull request #3999 (diff) | |
parent | electrum-words: fix bytes_to_words on big endian (diff) | |
download | monero-91c7d68b2d476c86e8ba710ccac6f3c64b91f1a5.tar.xz |
Merge pull request #4223
c955257 electrum-words: fix bytes_to_words on big endian (moneromooo-monero)
Diffstat (limited to '')
-rw-r--r-- | src/mnemonics/electrum-words.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mnemonics/electrum-words.cpp b/src/mnemonics/electrum-words.cpp index 290f2cb93..3d6338856 100644 --- a/src/mnemonics/electrum-words.cpp +++ b/src/mnemonics/electrum-words.cpp @@ -47,6 +47,7 @@ #include "misc_language.h" #include "crypto/crypto.h" // for declaration of crypto::secret_key #include <fstream> +#include "common/int-util.h" #include "mnemonics/electrum-words.h" #include <stdexcept> #include <boost/filesystem.hpp> @@ -411,7 +412,7 @@ namespace crypto { uint32_t w[4]; - memcpy(&w[0], src + (i * 4), 4); + w[0] = SWAP32LE(*(const uint32_t*)(src + (i * 4))); w[1] = w[0] % word_list_length; w[2] = ((w[0] / word_list_length) + w[1]) % word_list_length; |