mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 11:53:28 +02:00
Explicitly null-terminate a string
This commit is contained in:
parent
dbbd3351ef
commit
91b1910b86
1 changed files with 3 additions and 1 deletions
|
@ -223,8 +223,10 @@ void NodeBounds::drawOverlay() {
|
|||
const int BACKGROUND_OFFSET_Y = -20;
|
||||
const int BACKGROUND_BEVEL = 3;
|
||||
|
||||
char textData[_overlayText.length() + 1];
|
||||
int textLength = _overlayText.length();
|
||||
char textData[textLength + 1];
|
||||
strcpy(textData, _overlayText.toLatin1().constData());
|
||||
textData[textLength] = '\0';
|
||||
|
||||
int mouseX = application->getMouseX(),
|
||||
mouseY = application->getMouseY(),
|
||||
|
|
Loading…
Reference in a new issue