mirror of https://github.com/axmolengine/axmol.git
aacec550c9
Out of range occurred in some condition when using `Label` with its `getLetter()` member function. `Label::recordPlaceholderInfo()` member function is called for new line (\n) letter in `Label::multilineTextWrap()`, but the function doesn't set `_lettersInfo[letterIndex].lineIndex`. But `lineIndex` is used in `Label::updateLabelLetters()` even if letter is new line. This change checks `letterInfo.valid` to avoid accessing `_linesOffsetX[letterInfo.lineIndex]` for invalid (i.e. `NewLine`) letter. |
||
---|---|---|
.. | ||
Classes | ||
Resources | ||
proj.android | ||
proj.ios | ||
proj.linux | ||
proj.mac | ||
proj.win10 | ||
proj.win32 | ||
.cocos-project.json | ||
CMakeLists.txt |