From 8542ee59db85e4cb86c1b6fc9ac2330f24129de4 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 21 Apr 2017 12:42:51 -0700 Subject: [PATCH] Windows crash fix. --- service/OneService.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service/OneService.cpp b/service/OneService.cpp index a9185eeab..b151d25d0 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -988,7 +988,7 @@ public: std::map::const_iterator n(_nets.find(nwid)); if (n == _nets.end()) return false; - memcpy(&settings,&(n->second.settings),sizeof(NetworkSettings)); + settings = n->second.settings; return true; } @@ -999,7 +999,7 @@ public: std::map::iterator n(_nets.find(nwid)); if (n == _nets.end()) return false; - memcpy(&(n->second.settings),&settings,sizeof(NetworkSettings)); + n->second.settings = settings; char nlcpath[256]; Utils::snprintf(nlcpath,sizeof(nlcpath),"%s" ZT_PATH_SEPARATOR_S "networks.d" ZT_PATH_SEPARATOR_S "%.16llx.local.conf",_homePath.c_str(),nwid);