mirror of
https://github.com/aristocratos/btop.git
synced 2024-05-18 19:33:03 +12:00
Fixed broken uresize()
This commit is contained in:
parent
9667fe65b4
commit
dbb5a0599b
|
@ -238,8 +238,8 @@ namespace Tools {
|
|||
if (len < 1) return "";
|
||||
for (size_t x = 0, i = 0; i < str.size(); i++) {
|
||||
if ((static_cast<unsigned char>(str.at(i)) & 0xC0) != 0x80) x++;
|
||||
if (x == len) {
|
||||
str.resize(i + 1);
|
||||
if (x == len + 1) {
|
||||
str.resize(i);
|
||||
str.shrink_to_fit();
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue