forked from mirror/OpenTTD
Codechange: All ParagraphLayoutFactory::AppendToBuffer assume that the buffer has at least some space.
Assert on that.
This commit is contained in:
@@ -63,6 +63,7 @@ public:
|
||||
*/
|
||||
static size_t AppendToBuffer(CharType *buff, const CharType *buffer_last, char32_t c)
|
||||
{
|
||||
assert(buff < buffer_last);
|
||||
if (c >= 0x010000U) {
|
||||
/* Character is encoded using surrogates in UTF-16. */
|
||||
if (buff + 1 <= buffer_last) {
|
||||
|
Reference in New Issue
Block a user