diff options
author | dartraiden <wowemuh@gmail.com> | 2021-07-29 03:58:47 +0300 |
---|---|---|
committer | dartraiden <wowemuh@gmail.com> | 2021-07-29 04:00:29 +0300 |
commit | fe19d22eaddb5383337114ab7a611d781de24b59 (patch) | |
tree | 618312785cafc338b2f3369184ef17364c20e6ec /libs/libcurl/src/mprintf.c | |
parent | d60a8d0c45ea7903274c570f523b7775125f4e89 (diff) |
libcurl: update to 7.78
Diffstat (limited to 'libs/libcurl/src/mprintf.c')
-rw-r--r-- | libs/libcurl/src/mprintf.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/libcurl/src/mprintf.c b/libs/libcurl/src/mprintf.c index 5292026861..7a1aec570e 100644 --- a/libs/libcurl/src/mprintf.c +++ b/libs/libcurl/src/mprintf.c @@ -1017,9 +1017,11 @@ int curl_mvsnprintf(char *buffer, size_t maxlength, const char *format, retcode = dprintf_formatf(&info, addbyter, format, ap_save); if((retcode != -1) && info.max) { /* we terminate this with a zero byte */ - if(info.max == info.length) + if(info.max == info.length) { /* we're at maximum, scrap the last letter */ info.buffer[-1] = 0; + retcode--; /* don't count the nul byte */ + } else info.buffer[0] = 0; } |