aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os/time.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-08-31 08:25:16 -0400
committerGitHub <noreply@github.com>2020-08-31 08:25:16 -0400
commit2bbbb34ce78ee30c1ee53a9cb3fd1e7608185716 (patch)
tree875713dfc511297f472fe6ffebb0ea4f14548420 /src/nvim/os/time.c
parent24b5f69a4922e53baa46faf4f5e0b05da42cd2d5 (diff)
parent62ba227155b59c59f4d2d926bf2d4ed7168a0d97 (diff)
downloadrneovim-2bbbb34ce78ee30c1ee53a9cb3fd1e7608185716.tar.gz
rneovim-2bbbb34ce78ee30c1ee53a9cb3fd1e7608185716.tar.bz2
rneovim-2bbbb34ce78ee30c1ee53a9cb3fd1e7608185716.zip
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}
Diffstat (limited to 'src/nvim/os/time.c')
-rw-r--r--src/nvim/os/time.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/os/time.c b/src/nvim/os/time.c
index 349a91fc1e..4b6533cd0c 100644
--- a/src/nvim/os/time.c
+++ b/src/nvim/os/time.c
@@ -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;
}