Commit 663e928d authored by Deomid Ryabkov's avatar Deomid Ryabkov Committed by Cesanta Bot

Fix mg_strdup_nul

PUBLISHED_FROM=25bc4d20016bcb71c4e2e4b7be8d2d0566fdfa2e
parent 189cd8c5
...@@ -1406,12 +1406,12 @@ static struct mg_str mg_strdup_common(const struct mg_str s, ...@@ -1406,12 +1406,12 @@ static struct mg_str mg_strdup_common(const struct mg_str s,
struct mg_str mg_strdup(const struct mg_str s) WEAK; struct mg_str mg_strdup(const struct mg_str s) WEAK;
struct mg_str mg_strdup(const struct mg_str s) { struct mg_str mg_strdup(const struct mg_str s) {
return mg_strdup_common(s, 1 /* NUL-terminate */); return mg_strdup_common(s, 0 /* NUL-terminate */);
} }
struct mg_str mg_strdup_nul(const struct mg_str s) WEAK; struct mg_str mg_strdup_nul(const struct mg_str s) WEAK;
struct mg_str mg_strdup_nul(const struct mg_str s) { struct mg_str mg_strdup_nul(const struct mg_str s) {
return mg_strdup_common(s, 0 /* NUL-terminate */); return mg_strdup_common(s, 1 /* NUL-terminate */);
} }
int mg_strcmp(const struct mg_str str1, const struct mg_str str2) WEAK; int mg_strcmp(const struct mg_str str1, const struct mg_str str2) WEAK;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment