GRAPHICS: Fix surface reallocation in MacText

This commit is contained in:
Eugene Sandulenko 2017-02-02 23:53:30 +01:00
parent 165f5f1784
commit 7b7a0fa3ad

View file

@ -213,7 +213,7 @@ void MacText::reallocSurface() {
return;
}
if (_surface->h < _textMaxWidth) {
if (_surface->w < _textMaxWidth || _surface->h < _textMaxHeight) {
// realloc surface and copy old content
ManagedSurface *n = new ManagedSurface(_textMaxWidth, _textMaxHeight);
n->blitFrom(*_surface, Common::Point(0, 0));