Skip to content

Commit

Permalink
Return an empty string, not null
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerkaraszewski committed Jul 29, 2024
1 parent 9d63d33 commit d62aeb3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libstuff/libstuff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2867,6 +2867,8 @@ string SREReplace(const string& regExp, const string& input, const string& repla
output = (char*)malloc(outSize);
} else if (result < 0) {
SWARN("Regex replacement failed with result " << result << ", returning nothing.");
output = (char*)malloc(1);
*output = 0;
break;
}
}
Expand Down

0 comments on commit d62aeb3

Please sign in to comment.