Merge pull request #12804 from janlazo/vim-8.1.1725

[RDY]vim-patch:8.1.{1694,1725,1776,1804,1806,1831,2041,2198,2206},8.2.{1033,1315,1548}
This commit is contained in:
Jan Edmund Lazo
2020-08-31 08:25:16 -04:00
committed by GitHub
9 changed files with 342 additions and 30 deletions

View File

@@ -176,10 +176,11 @@ char *os_ctime_r(const time_t *restrict clock, char *restrict result,
struct tm *clock_local_ptr = os_localtime_r(clock, &clock_local);
// MSVC returns NULL for an invalid value of seconds.
if (clock_local_ptr == NULL) {
snprintf(result, result_len, "%s\n", _("(Invalid)"));
xstrlcpy(result, _("(Invalid)"), result_len);
} else {
strftime(result, result_len, "%a %b %d %H:%M:%S %Y\n", clock_local_ptr);
strftime(result, result_len, _("%a %b %d %H:%M:%S %Y"), clock_local_ptr);
}
xstrlcat(result, "\n", result_len);
return result;
}