From 5a80de79fd9f509051c0e7173d7ef56f7f6cbb30 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Wed, 30 Jan 2013 13:32:12 -0500 Subject: [PATCH] Don't memset EAP's Crazy Crap Using memset there caused a crash. It works on all the other params, so I assume that eap's ARRAY thing is incapable of handling a memset. --- Sources/Plasma/PubUtilLib/plVault/plVaultClientApi.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Sources/Plasma/PubUtilLib/plVault/plVaultClientApi.cpp b/Sources/Plasma/PubUtilLib/plVault/plVaultClientApi.cpp index 7c601c24..35f8c5a1 100644 --- a/Sources/Plasma/PubUtilLib/plVault/plVaultClientApi.cpp +++ b/Sources/Plasma/PubUtilLib/plVault/plVaultClientApi.cpp @@ -2155,6 +2155,10 @@ namespace _VaultFindNodesAndWait { ARRAY(unsigned) nodeIds; ENetError result; bool complete; + + _FindNodeParam() + : result(kNetPending), complete(false) + { } }; static void _FindNodeCallback ( ENetError result, @@ -2175,10 +2179,8 @@ void VaultFindNodesAndWait ( ARRAY(unsigned) * nodeIds ) { using namespace _VaultFindNodesAndWait; - + _FindNodeParam param; - memset(¶m, 0, sizeof(param)); - NetCliAuthVaultNodeFind( templateNode, _FindNodeCallback, @@ -2190,7 +2192,7 @@ void VaultFindNodesAndWait ( plgDispatch::Dispatch()->MsgQueueProcess(); AsyncSleep(10); } - + if (IS_NET_SUCCESS(param.result)) nodeIds->Add(param.nodeIds.Ptr(), param.nodeIds.Count()); }