Skip to content

Commit de7a6fd

Browse files
committed
fix: remove extra invalid glyphs in text draws
Whenever an invalid code unit was detected, a placeholder should be emitted. This change fixes a bug where it also wrote out the original code unit as-is.
1 parent 683facc commit de7a6fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

engine/common/common.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ IndexedUTF32String IndexUTF8ToUTF32(std::string_view input)
484484
byteIdx += 4;
485485
}
486486
else {
487-
codepoints.push_back(0xFFFDu);
487+
codepoint = 0xFFFDu;
488488
byteIdx += 1;
489489
}
490490
codepoints.push_back(codepoint);

0 commit comments

Comments
 (0)