Skip to content

Commit

Permalink
shorten string to pos before concatenating (#3248)
Browse files Browse the repository at this point in the history
  • Loading branch information
m-m-adams authored Jan 9, 2025
1 parent f863b7a commit 64ebcdc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/deluge/util/d_string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ Error String::concatenateAtPos(char const* newChars, int32_t pos, int32_t newCha
return set({newChars, static_cast<size_t>(newCharsLength)});
}

if (newCharsLength == 0) {
return shorten(pos);
}
unique().resize(pos);

unique() += newChars;

Expand Down

0 comments on commit 64ebcdc

Please sign in to comment.