From 9279dbb2741de7bc599699a95728b1b7c2b6790a Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 10 Sep 2021 17:33:40 +0200 Subject: m + add card2ord MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- swedish.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'swedish.c') 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: -- cgit v1.2.3-70-g09d2