diff options
author | rodri <rgl@antares-labs.eu> | 2021-07-16 20:20:43 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2021-07-16 20:20:43 +0000 |
commit | 2fdb53d8c39a6ca4668ec8d5388432ccd9daa168 (patch) | |
tree | a95570659c3be6ff88ff0e980635f5fb58f1387d | |
parent | c59a4f460b30f2ff5a2dd47672d72f47c02d8b75 (diff) | |
download | libroman-front.tar.gz libroman-front.tar.bz2 libroman-front.zip |
roman.c: put the NIL at the right offset.
-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); |