Skip to content

Commit

Permalink
Fix broken colors when making a newline
Browse files Browse the repository at this point in the history
-nick12
  • Loading branch information
poco0317 committed Dec 7, 2018
1 parent 0ba57b8 commit 1498cdb
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/BitmapText.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1066,8 +1066,13 @@ ColorBitmapText::SetText(const RString& _sText,
cChange.l = iGlyphsSoFar;
if (iGlyphsSoFar == 0)
m_vColors[0] = cChange;
else
m_vColors.push_back(cChange);
else {
auto& back = m_vColors.back();
if (back.l == cChange.l)
back.c = cChange.c;
else
m_vColors.push_back(cChange);
}
i += 8;
continue;
}
Expand Down

0 comments on commit 1498cdb

Please sign in to comment.