mirror of
https://github.com/curl/curl.git
synced 2026-06-16 22:25:37 +03:00
mime:escape_string minor clarification change
... as it also removes a warning with old gcc versions. Bug: https://curl.haxx.se/mail/lib-2017-09/0049.html Reported-by: Ben Greear
This commit is contained in:
parent
e239eda39e
commit
bec50cc285
1 changed files with 5 additions and 2 deletions
|
|
@ -296,9 +296,12 @@ static char *escape_string(const char *src, size_t len)
|
|||
for(i = 0; len; len--) {
|
||||
char c = *src++;
|
||||
|
||||
if(c == '"' || c == '\\' || !c)
|
||||
if(c == '"' || c == '\\' || !c) {
|
||||
dst[i++] = '\\';
|
||||
dst[i++] = c? c: '0';
|
||||
if(!c)
|
||||
c = '0';
|
||||
}
|
||||
dst[i++] = c;
|
||||
}
|
||||
|
||||
dst[i] = '\0';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue