mirror of
https://gitee.com/TarsCloud/TarsCpp.git
synced 2024-12-22 22:16:38 +08:00
fix compile problem of some gcc compiler:dynamic array can't be initialized where defined
This commit is contained in:
parent
a0afa4ca1a
commit
7154194106
@ -645,7 +645,8 @@ void ServantHandle::processTracking(const TarsCurrentPtr ¤t)
|
|||||||
{
|
{
|
||||||
TLOGINFO("[TARS] servant got a tracking request, tracking key:" << trackinfoIter->second << endl);
|
TLOGINFO("[TARS] servant got a tracking request, tracking key:" << trackinfoIter->second << endl);
|
||||||
string context = trackinfoIter->second;
|
string context = trackinfoIter->second;
|
||||||
char szBuffer[context.size() + 1] = {0};
|
char szBuffer[context.size() + 1];
|
||||||
|
memset(szBuffer, 0x00, context.size() + 1);
|
||||||
memcpy(szBuffer, context.c_str(), context.size());
|
memcpy(szBuffer, context.c_str(), context.size());
|
||||||
|
|
||||||
std::unordered_map<std::string, std::string> text_map;
|
std::unordered_map<std::string, std::string> text_map;
|
||||||
|
Loading…
Reference in New Issue
Block a user