forked from townforge/townforge
game: fix windows build
This commit is contained in:
parent
c263cba732
commit
3df168efda
@ -22,6 +22,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <Urho3D/Graphics/Drawable.h>
|
||||
|
||||
namespace Urho3D
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user