Fix crash when creating null terminator in updateRichText (writing out of bounds)
This commit is contained in:
parent
5b51e67044
commit
a9cce88be6
@ -55,7 +55,7 @@ void RichLabel::updateRichText()
|
|||||||
int originalTextPos = 0;
|
int originalTextPos = 0;
|
||||||
char * originalText = new char[textSource.length()+1];
|
char * originalText = new char[textSource.length()+1];
|
||||||
std::copy(textSource.begin(), textSource.end(), originalText);
|
std::copy(textSource.begin(), textSource.end(), originalText);
|
||||||
originalText[textSource.length()+1] = 0;
|
originalText[textSource.length()] = 0;
|
||||||
|
|
||||||
int stackPos = -1;
|
int stackPos = -1;
|
||||||
RichTextRegion * regionsStack = new RichTextRegion[256];
|
RichTextRegion * regionsStack = new RichTextRegion[256];
|
||||||
|
Loading…
Reference in New Issue
Block a user