diff --git a/ChangeLog b/ChangeLog index c646934..b8d7679 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-10-23 Richard B. Kreckel + + * src/integer/conv/cl_I_from_digits.cc (digits_to_I): Fix thinko in + new code for base power of two. + 2004-10-22 Richard B. Kreckel * src/integer/conv/cl_I_to_digits (I_to_digits): Fix an elusive stack diff --git a/src/integer/conv/cl_I_from_digits.cc b/src/integer/conv/cl_I_from_digits.cc index 76296aa..1f49bbd 100644 --- a/src/integer/conv/cl_I_from_digits.cc +++ b/src/integer/conv/cl_I_from_digits.cc @@ -23,7 +23,7 @@ const cl_I digits_to_I (const char * MSBptr, uintL len, uintD base) // Fast path for powers of two: write the digits from least // significant to most significant into the result NUDS. var int b = (base==2 ? 1 : base==4 ? 2 : base==8 ? 3 : base==16 ? 4 : /*base==32*/ 5); - num_stack_alloc(1+(len*b-1)/intDsize,,erg_LSDptr=); + num_stack_alloc(1+(len*b)/intDsize,,erg_LSDptr=); erg_MSDptr = erg_LSDptr; erg_len = 0; var uintD d = 0; // resulting digit var int ch_where = 0; // position of ch inside d