Skip to content

Commit

Permalink
Fix: TextShaper::splitTextRuns handling of empty input
Browse files Browse the repository at this point in the history
  • Loading branch information
past-due committed Jun 24, 2024
1 parent 14b5035 commit 17fef77
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/ivis_opengl/textdraw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -864,12 +864,16 @@ struct TextShaper
{
std::vector<TextRun> textRuns;
#if defined(WZ_FRIBIDI_ENABLED)
FriBidiParType baseDirection;
FriBidiParType baseDirection = FRIBIDI_PAR_LTR;
#endif
};

SplitTextRunsResult splitTextRuns(const std::vector<uint32_t>& codePoints, iV_fonts fontID)
{
if (codePoints.empty())
{
return {};
}
int codePoints_size = static_cast<int>(codePoints.size());
#if SIZE_MAX > INT32_MAX
if (codePoints.size() > static_cast<size_t>(std::numeric_limits<int>::max()))
Expand Down

0 comments on commit 17fef77

Please sign in to comment.