Uninitialized vector entry?
[minix3.git] / lib / stdio / icompute.c
blob5e7fa80f6c853434ce4063067b52e3e948e9e4d0
1 /*
2 * icompute.c - compute an integer
3 */
4 /* $Header$ */
6 #include "loc_incl.h"
8 /* This routine is used in doprnt.c as well as in tmpfile.c and tmpnam.c. */
10 char *
11 _i_compute(unsigned long val, int base, char *s, int nrdigits)
13 int c;
15 c= val % base ;
16 val /= base ;
17 if (val || nrdigits > 1)
18 s = _i_compute(val, base, s, nrdigits - 1);
19 *s++ = (c>9 ? c-10+'a' : c+'0');
20 return s;