Corretta setdec nel caso di reali senza decimali

git-svn-id: svn://10.65.10.50/trunk@712 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 1994-12-02 13:04:07 +00:00
parent eb9ed8599b
commit d7aec9b15e

View File

@ -538,9 +538,8 @@ Se si utilizza spiegarne dettagliatamente il motivo.
else else
if (!dec) if (!dec)
{ {
if (s1 == NULL) return ;
l = LENGTH(s1); /* occhio verificare */ l = LENGTH(s1); /* occhio verificare */
if (s1 != NULL)
{
carry = (s1[1] >= '5'); carry = (s1[1] >= '5');
*s1 = '\0'; *s1 = '\0';
while (carry) while (carry)
@ -563,7 +562,6 @@ Se si utilizza spiegarne dettagliatamente il motivo.
for (i = l; i > (*s1 == '-'); i--) s[i] = s[i - 1]; for (i = l; i > (*s1 == '-'); i--) s[i] = s[i - 1];
s[(*s1 == '-')] = '1'; s[(*s1 == '-')] = '1';
} }
}
return; return;
} }
s1++; s1++;