Skip to content

Commit

Permalink
[grc] fix ellipsis for c++20
Browse files Browse the repository at this point in the history
  • Loading branch information
fairbird committed Jan 21, 2024
1 parent 1321205 commit c9a6c27
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/gdi/grc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,7 @@ void gDC::exec(const gOpcode *o)
break;
case gOpcode::renderText:
{
const char *ellipsis = reinterpret_cast<const char *>(u8"");
ePtr<eTextPara> para = new eTextPara(o->parm.renderText->area);
int flags = o->parm.renderText->flags;
int border = o->parm.renderText->border;
Expand All @@ -811,7 +812,7 @@ void gDC::exec(const gOpcode *o)
if (flags & gPainter::RT_WRAP) // Remove wrap
flags -= gPainter::RT_WRAP;
std::string text = o->parm.renderText->text;
text += u8"";
text += ellipsis;

eTextPara testpara(o->parm.renderText->area);
testpara.setFont(m_current_font);
Expand All @@ -826,7 +827,7 @@ void gDC::exec(const gOpcode *o)
if ((int)text.size() > ns)
{
text.resize(ns);
text += u8"";
text += ellipsis;
}
if (o->parm.renderText->text)
free(o->parm.renderText->text);
Expand Down

0 comments on commit c9a6c27

Please sign in to comment.