diff options
-rw-r--r-- | roman.c | 2 | ||||
-rw-r--r-- | test.c | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -52,7 +52,7 @@ dectoroman(int n, char *buf, ulong len) n -= decimal[i]; } } - buf[len-1] = 0; + buf[o] = 0; return 0; } @@ -29,7 +29,7 @@ main(int argc, char *argv[]) if(argc != 0) usage(); - if(decimal >= 0){ + if(decimal > 0){ if(dectoroman(decimal, buf, sizeof buf) < 0) sysfatal("dectoroman: %r"); print("%s\n", buf); |