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:
parent
61886fc829
commit
5002f435ae
|
@ -2229,16 +2229,19 @@ public:
|
||||||
void FromInt(Int<int_size> value)
|
void FromInt(Int<int_size> value)
|
||||||
{
|
{
|
||||||
info = 0;
|
info = 0;
|
||||||
|
bool is_sign = false;
|
||||||
|
|
||||||
if( value.IsSign() )
|
if( value.IsSign() )
|
||||||
{
|
{
|
||||||
value.ChangeSign();
|
value.ChangeSign();
|
||||||
SetSign();
|
is_sign = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
sint compensation = (sint)value.CompensationToLeft();
|
sint compensation = (sint)value.CompensationToLeft();
|
||||||
|
FromUIntOrInt(value, compensation);
|
||||||
|
|
||||||
return FromUIntOrInt(value, compensation);
|
if( is_sign )
|
||||||
|
SetSign();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue