mirror of
https://github.com/nerzhul/ownCloud-SMS-App.git
synced 2025-06-19 13:56:28 +00:00
json::escape_string: if str is null return empty string
This commit is contained in:
parent
8e15e18b09
commit
d8855fd2c6
@ -23,6 +23,10 @@ namespace json {
|
||||
|
||||
std::string escape_string(const char *str)
|
||||
{
|
||||
if (!str) {
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string result;
|
||||
// Create a sufficient buffer to escape all chars
|
||||
result.reserve(strlen(str) * 2 + 3);
|
||||
|
Loading…
x
Reference in New Issue
Block a user