From 72c3f36ca44a4be4d237095fd14e1ff862af5864 Mon Sep 17 00:00:00 2001 From: Thomas Winget Date: Fri, 6 Jun 2014 15:45:21 -0400 Subject: [PATCH] fixed some pointer- and loop-based derps --- src/crypto/electrum-words.cpp | 2 +- src/cryptonote_core/account.cpp | 3 +++ src/simplewallet/simplewallet.cpp | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/crypto/electrum-words.cpp b/src/crypto/electrum-words.cpp index 048aa403f..5489d5034 100644 --- a/src/crypto/electrum-words.cpp +++ b/src/crypto/electrum-words.cpp @@ -84,7 +84,7 @@ namespace crypto uint32_t val; - memcpy(&val, &src.data, 4); + memcpy(&val, (src.data) + (i * 4), 4); w1 = val % n; w2 = ((val / n) + w1) % n; diff --git a/src/cryptonote_core/account.cpp b/src/cryptonote_core/account.cpp index bd47c8ba4..f4de36738 100644 --- a/src/cryptonote_core/account.cpp +++ b/src/cryptonote_core/account.cpp @@ -10,7 +10,10 @@ #include "account.h" #include "warnings.h" #include "crypto/crypto.h" +extern "C" +{ #include "crypto/blake256.h" +} #include "cryptonote_core/cryptonote_basic_impl.h" #include "cryptonote_core/cryptonote_format_utils.h" using namespace std; diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 261c150e9..ef96d7b96 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -953,6 +953,8 @@ int main(int argc, char* argv[]) command_line::add_arg(desc_params, arg_daemon_port); command_line::add_arg(desc_params, arg_command); command_line::add_arg(desc_params, arg_log_level); + command_line::add_arg(desc_params, arg_recover ); + command_line::add_arg(desc_params, arg_electrum_seed ); tools::wallet_rpc_server::init_options(desc_params); po::positional_options_description positional_options;