fixed: there was an error in Big::FromInt(Int<int_size> value)

SetSign() was used before the object was initialized


git-svn-id: svn://ttmath.org/publicrep/ttmath/trunk@58 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
Tomasz Sowa 2007-11-09 13:28:36 +00:00
parent 61886fc829
commit 5002f435ae
1 changed files with 6 additions and 3 deletions

View File

@ -2229,16 +2229,19 @@ public:
void FromInt(Int<int_size> value)
{
info = 0;
bool is_sign = false;
if( value.IsSign() )
{
value.ChangeSign();
SetSign();
is_sign = true;
}
sint compensation = (sint)value.CompensationToLeft();
FromUIntOrInt(value, compensation);
return FromUIntOrInt(value, compensation);
if( is_sign )
SetSign();
}