diff --git a/src/ColorizedStream.cc b/src/ColorizedStream.cc index 4388406e..0f7656c3 100644 --- a/src/ColorizedStream.cc +++ b/src/ColorizedStream.cc @@ -86,9 +86,7 @@ std::string ColorizedStreamBuf::str(bool color, size_t max) const } auto size = e.second.size(); if (size > max) { - auto cut = e.second; - cut.resize(max); - rv << cut; + rv.write(e.second.c_str(), max); break; } rv << e.second;