From 2fdb53d8c39a6ca4668ec8d5388432ccd9daa168 Mon Sep 17 00:00:00 2001 From: rodri Date: Fri, 16 Jul 2021 20:20:43 +0000 Subject: test.c: there's no roman numeral for the number zero. roman.c: put the NIL at the right offset. --- roman.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'roman.c') diff --git a/roman.c b/roman.c index 6606e25..d669cc2 100644 --- a/roman.c +++ b/roman.c @@ -52,7 +52,7 @@ dectoroman(int n, char *buf, ulong len) n -= decimal[i]; } } - buf[len-1] = 0; + buf[o] = 0; return 0; } -- cgit v1.2.3