fix %e format ... problem spotted by Doug Simons

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28257 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2009-04-27 18:56:42 +00:00
parent a17d3c29b0
commit e8db6ca052

View file

@ -1969,16 +1969,15 @@ static void Grow(DescriptionInfo *info, unsigned size)
v = info->dom;
Grow(info, 2);
v = v % 100;
if (v%10 == '0')
if (v < 10)
{
info->t[info->offset+1] = ' ';
info->t[info->offset] = ' ';
}
else
{
info->t[info->offset+1] = (v%10) + '0';
info->t[info->offset] = (v/10) + '0';
}
v /= 10;
info->t[info->offset+0] = (v%10) + '0';
info->t[info->offset+1] = (v%10) + '0';
info->offset += 2;
break;