diff --git a/NetTunnelSDK/UserManager.cpp b/NetTunnelSDK/UserManager.cpp index f66e933..410b1f7 100644 --- a/NetTunnelSDK/UserManager.cpp +++ b/NetTunnelSDK/UserManager.cpp @@ -474,6 +474,7 @@ int GetUserClientConfigure(const TCHAR *pUserName, const TCHAR *pToken, PUSER_CL PUSER_CLIENT_CONFIG pUserCfg = &pUser->cliConfig; TCHAR userPath[MAX_PATH]; int ret; + TCHAR *pConvRet; #if USER_REAL_PLATFORM ProtocolRequest req; @@ -565,9 +566,9 @@ int GetUserClientConfigure(const TCHAR *pUserName, const TCHAR *pToken, PUSER_CL return ret; } - ret = strtol(rsp.code.c_str(), nullptr, 10); + ret = strtol(rsp.code.c_str(), &pConvRet, 10); - if (ret != 0) { + if (ret != 0 || lstrlen(pConvRet) > 0) { SPDLOG_ERROR(TEXT("Server response error code: {0}"), ret); return -ERR_HTTP_SERVER_RSP; }