Skip to content

Commit

Permalink
Fix buffer creation
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAssassin committed Jan 23, 2022
1 parent 68c260e commit 38db362
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ namespace appimage::update::util {

std::vector<char> makeBuffer(const std::string& str) {
std::vector<char> buffer;
buffer.reserve(str.size() + 1);
buffer.resize(str.size());
std::copy(str.begin(), str.end(), buffer.begin());
buffer.emplace_back('\0');
return buffer;
Expand Down

0 comments on commit 38db362

Please sign in to comment.