Skip to content

Commit 6cc1517

Browse files
committed
fixed:get user time parse failure
1 parent 945e735 commit 6cc1517

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

XEngine_Module/XEngine_Verification/Verification_XAuth/Verification_XAuthNet.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,8 @@ bool CVerification_XAuthNet::Verification_XAuthNet_GetTime(LPCXSTR lpszURLAddr,
366366
{
367367
return false;
368368
}
369+
st_JsonRoot.clear();
370+
st_JsonObject.clear();
369371
//解析回复
370372
std::unique_ptr<Json::CharReader> const pSt_JsonReader(st_ReaderBuilder.newCharReader());
371373
if (!pSt_JsonReader->parse(tszMSGBuffer, tszMSGBuffer + nMsgLen, &st_JsonRoot, &st_JsonError))
@@ -387,7 +389,7 @@ bool CVerification_XAuthNet::Verification_XAuthNet_GetTime(LPCXSTR lpszURLAddr,
387389
Verification_dwErrorCode = ERROR_XENGINE_MODULE_VERIFICATION_XAUTH_CODE;
388390
return false;
389391
}
390-
st_JsonObject = st_JsonRoot["st_UserTime"];
392+
st_JsonObject = st_JsonRoot["st_UserTime"][0];
391393

392394
if (!st_JsonObject["enSerialType"].isNull())
393395
{

0 commit comments

Comments
 (0)