mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05: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
@ -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…
Reference in New Issue
Block a user