fix format('~2D',[0]).

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1452 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2005-11-10 12:59:21 +00:00
parent 01de9c0b38
commit 3cf7a1f59a

View File

@ -4070,8 +4070,11 @@ format(volatile Term otail, volatile Term oargs, int sno)
dec = -dec; dec = -dec;
f_putc(sno, (int) '-'); f_putc(sno, (int) '-');
} else if (dec == 0) { } else if (dec == 0) {
f_putc(sno, '0'); /* make sure we write something */
break; f_putc(sno, '0');
if (repeats == 0) {
break;
}
} }
i = dec; i = dec;
siz = 0; siz = 0;