mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +00:00
Add a comment
This commit is contained in:
parent
bd49fe3cb0
commit
16af2a126e
1 changed files with 3 additions and 1 deletions
|
|
@ -187,7 +187,9 @@ void GuiTextCtrl::setText(const char *txt)
|
|||
//make sure we don't call this before onAdd();
|
||||
if( !mProfile )
|
||||
return;
|
||||
|
||||
|
||||
// The txt pointer is sometimes the same as the mText pointer, so make sure
|
||||
// we don't call strncpy with overlapping src and dest.
|
||||
if (txt && txt != mText)
|
||||
dStrncpy(mText, (UTF8*)txt, MAX_STRING_LENGTH);
|
||||
mText[MAX_STRING_LENGTH] = '\0';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue