Skip to content

Commit

Permalink
Fix two
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveBeeblebrox committed Dec 13, 2023
1 parent f3ffff0 commit 1b16bba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ extern "C" {
const std::vector<std::string> macros(p_macros, p_macros + macro_count);

const std::string RESULT = preprocess_text(std::string(p_text), p_filename, (Mode)mode, macros, on_message);
char* p_out = new char[RESULT.size()];
char* p_out = new char[RESULT.size() + 1]; // +1 for terminating NUL
strcpy(p_out, RESULT.c_str());

return p_out;
Expand Down

0 comments on commit 1b16bba

Please sign in to comment.