parent
85cd27138d
commit
377046e315
|
@ -114,7 +114,7 @@ public:
|
||||||
explicit String(Codepoint cp, ColumnCount count)
|
explicit String(Codepoint cp, ColumnCount count)
|
||||||
{
|
{
|
||||||
kak_assert(count % codepoint_width(cp) == 0);
|
kak_assert(count % codepoint_width(cp) == 0);
|
||||||
int cp_count = (int)(count / codepoint_width(cp));
|
int cp_count = (int)(count / std::max(codepoint_width(cp), 1_col));
|
||||||
reserve(utf8::codepoint_size(cp) * cp_count);
|
reserve(utf8::codepoint_size(cp) * cp_count);
|
||||||
while (cp_count-- > 0)
|
while (cp_count-- > 0)
|
||||||
utf8::dump(std::back_inserter(*this), cp);
|
utf8::dump(std::back_inserter(*this), cp);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user