Skip to content

Commit 97d2eab

Browse files
fix clamp string lnt
1 parent e0e20fc commit 97d2eab

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/apple_music_rpc_cpp/utils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ std::string clamp_string(const std::string& input) {
4646
if (clamped.length() <= 2) {
4747
clamped += std::string(3 - clamped.length(), ' ');
4848
} else if (clamped.length() >= 128) {
49-
clamped = clamped.substr(0, 125) + "...";
49+
clamped = clamped.replace(125, 128, "...");
5050
}
5151

5252
return clamped;

0 commit comments

Comments
 (0)