summaryrefslogtreecommitdiffstats
path: root/swedish.c
diff options
context:
space:
mode:
Diffstat (limited to 'swedish.c')
-rw-r--r--swedish.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/swedish.c b/swedish.c
index 4fec515..b4b1207 100644
--- a/swedish.c
+++ b/swedish.c
@@ -639,6 +639,10 @@ libnumtext_card2ord_swedish__(char *outbuf, size_t outbuf_size, const char *num,
}
length += 1;
+ if (outbuf_size)
+ outbuf[length < outbuf_size ? length : outbuf_size] = '\0';
+ length += 1;
+
return (ssize_t)length;
einval: