1
0
Fork 0

DBG: truncate labels in LabelGet

This commit is contained in:
Duncan Ogilvie 2020-05-28 12:15:39 +02:00
parent 33403df92b
commit 9c3e5ec5ff
1 changed files with 2 additions and 2 deletions

View File

@ -83,11 +83,11 @@ bool LabelGet(duint Address, char* Text)
if(found == tempLabels.end())
return false;
if(Text)
strcpy_s(Text, MAX_LABEL_SIZE, found->second.c_str());
strncpy_s(Text, MAX_LABEL_SIZE, found->second.c_str(), _TRUNCATE);
return true;
}
if(Text)
strcpy_s(Text, MAX_LABEL_SIZE, label.text.c_str());
strncpy_s(Text, MAX_LABEL_SIZE, label.text.c_str(), _TRUNCATE);
return true;
}