some fixes

This commit is contained in:
ceriel
1987-07-10 09:06:19 +00:00
parent f12358bfb0
commit fbf67d7a29
3 changed files with 14 additions and 10 deletions

View File

@@ -52,9 +52,9 @@ cvt(value, ndigit, decpt, sign, ecvtflag)
the conversion to "int" truncates
*/
if (pe >= &buf1[NDIGITS]) {
pb = &buf1[NDIGITS-10];
while (pb > buf1) *--pb = *--pe;
pe = &buf[NDIGITS-10];
pb = &buf1[10];
pe = &buf1[0];
while (pb < &buf1[NDIGITS]) *pe++ = *pb++;
}
*pe++ = (int)((value+.05) * 10) + '0';
pointpos++;