aboutsummaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authorgrunfink <grunfink@comam.es>2026-02-03 08:18:59 +0100
committergrunfink <grunfink@comam.es>2026-02-03 08:18:59 +0100
commit86359ddf67b4384fb731d18f594279b05fa30416 (patch)
treeb202dfba7a2eb520969a0a480b1f202f00b31df1 /html.c
parent8048ef20d2cbc8fc93bc8302667cfa6995d7c778 (diff)
Call xs_replace_i() in html_date_label() instead of overwriting.
Diffstat (limited to 'html.c')
-rw-r--r--html.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/html.c b/html.c
index 8634d4b..8efae90 100644
--- a/html.c
+++ b/html.c
@@ -234,8 +234,8 @@ xs_str *html_date_label(snac *user, const char *date)
/* copy the 3letter translated month name */
const char *m = L(months[tm.tm_mon]);
- if (xs_is_string(m) && strlen(m) >= 3)
- memcpy(date, m, 3);
+ if (xs_is_string(m))
+ date = xs_replace_i(date, months[tm.tm_mon], m);
}
return date;