mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 19:29:09 +00:00
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.
This commit is contained in:
@ -2155,6 +2155,10 @@ namespace _VaultFindNodesAndWait {
|
|||||||
ARRAY(unsigned) nodeIds;
|
ARRAY(unsigned) nodeIds;
|
||||||
ENetError result;
|
ENetError result;
|
||||||
bool complete;
|
bool complete;
|
||||||
|
|
||||||
|
_FindNodeParam()
|
||||||
|
: result(kNetPending), complete(false)
|
||||||
|
{ }
|
||||||
};
|
};
|
||||||
static void _FindNodeCallback (
|
static void _FindNodeCallback (
|
||||||
ENetError result,
|
ENetError result,
|
||||||
@ -2175,10 +2179,8 @@ void VaultFindNodesAndWait (
|
|||||||
ARRAY(unsigned) * nodeIds
|
ARRAY(unsigned) * nodeIds
|
||||||
) {
|
) {
|
||||||
using namespace _VaultFindNodesAndWait;
|
using namespace _VaultFindNodesAndWait;
|
||||||
|
|
||||||
_FindNodeParam param;
|
_FindNodeParam param;
|
||||||
memset(¶m, 0, sizeof(param));
|
|
||||||
|
|
||||||
NetCliAuthVaultNodeFind(
|
NetCliAuthVaultNodeFind(
|
||||||
templateNode,
|
templateNode,
|
||||||
_FindNodeCallback,
|
_FindNodeCallback,
|
||||||
@ -2190,7 +2192,7 @@ void VaultFindNodesAndWait (
|
|||||||
plgDispatch::Dispatch()->MsgQueueProcess();
|
plgDispatch::Dispatch()->MsgQueueProcess();
|
||||||
AsyncSleep(10);
|
AsyncSleep(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IS_NET_SUCCESS(param.result))
|
if (IS_NET_SUCCESS(param.result))
|
||||||
nodeIds->Add(param.nodeIds.Ptr(), param.nodeIds.Count());
|
nodeIds->Add(param.nodeIds.Ptr(), param.nodeIds.Count());
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user