game: fix windows build

This commit is contained in:
Crypto City 2021-10-12 19:24:52 +00:00
parent c263cba732
commit 3df168efda
2 changed files with 6 additions and 3 deletions

View File

@ -22,6 +22,7 @@
#pragma once
#include <stdint.h>
#include <Urho3D/Graphics/Drawable.h>
namespace Urho3D

View File

@ -720,14 +720,16 @@ void GameWalletInternal::configure_wallet()
int sz = zmq_recv(socket, msg, sizeof(msg), 0);
if (sz >= 0)
{
const std::string smsg(msg, sz);
if (sz >= (int)strlen("json-minimal-sync:") && !memcmp(msg, "json-minimal-sync:", strlen("json-minimal-sync:")))
{
zmq_syncing = !!memmem(msg, sz, "\"syncing\":true", strlen("\"syncing\":true"));
zmq_syncing = smsg.find("\"syncing\":true") != std::string::npos;
if (zmq_syncing)
{
const char *ptr = (const char*)memmem(msg, sz, "\"target\":", strlen("\"target\":"));
if (ptr)
const std::string::size_type pos = smsg.find("\"target\":");
if (pos != std::string::npos)
{
const char *ptr = smsg.c_str() + pos;
std::shared_ptr<tools::wallet2> w = wallet();
if (w)
{