mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibGfx+AK: Make text elision work with multi-byte characters
This was causing WindowServer and Taskbar to crash sometimes when the stars aligned and we tried cutting off a string ending with "..." right on top of an emoji. :^)
This commit is contained in:
@@ -65,7 +65,7 @@ Utf8CodepointIterator Utf8View::end() const
|
||||
return { end_ptr(), 0 };
|
||||
}
|
||||
|
||||
int Utf8View::byte_offset_of(const Utf8CodepointIterator& it) const
|
||||
size_t Utf8View::byte_offset_of(const Utf8CodepointIterator& it) const
|
||||
{
|
||||
ASSERT(it.m_ptr >= begin_ptr());
|
||||
ASSERT(it.m_ptr <= end_ptr());
|
||||
|
||||
Reference in New Issue
Block a user