aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoin-cli.cpp
diff options
context:
space:
mode:
authorChun Kuan Lee <ken2812221@gmail.com>2018-08-05 16:38:25 +0000
committerChun Kuan Lee <ken2812221@gmail.com>2018-09-30 15:08:16 +0800
commit380c843217139b180457889699c65b37ae3b4a87 (patch)
tree14f563548a07e34860364c8046e83ef8671730a9 /src/bitcoin-cli.cpp
parent9b8bb5f1402a07736be7d649c2253253672d04e1 (diff)
utils: Convert Windows args to utf-8 string
Diffstat (limited to 'src/bitcoin-cli.cpp')
-rw-r--r--src/bitcoin-cli.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index 09507fd249..f466505114 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -17,6 +17,7 @@
#include <memory>
#include <stdio.h>
+#include <tuple>
#include <event2/buffer.h>
#include <event2/keyvalq_struct.h>
@@ -511,6 +512,10 @@ static int CommandLineRPC(int argc, char *argv[])
int main(int argc, char* argv[])
{
+#ifdef WIN32
+ util::WinCmdLineArgs winArgs;
+ std::tie(argc, argv) = winArgs.get();
+#endif
SetupEnvironment();
if (!SetupNetworking()) {
fprintf(stderr, "Error: Initializing networking failed\n");