diff options
Diffstat (limited to 'foci.c')
-rw-r--r-- | foci.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -53,7 +53,7 @@ NAKED void compname(void) } RESTORE; - *--sp = *(unsigned char *)here; + *--sp = *(unsigned char *)here + 1; NEXT; } @@ -172,18 +172,21 @@ static void dotimpl(intptr_t n) { static const char dottbl[16] = "0123456789abcdef"; static char dotbuf[16] = {0}; - int i; + int i = 0; if (n < 0) { n *= -1; foci_putchar('-'); } - for (i = 0; n > 0; n /= 10) + do { dotbuf[i++] = dottbl[n % BASE]; + n /= BASE; + } while (n); while (--i >= 0) foci_putchar(dotbuf[i]); + foci_putchar(' '); } |