From b044ba9e365abea8da735f70b2c796fcdf5b82e7 Mon Sep 17 00:00:00 2001 From: Richard Kreckel Date: Wed, 6 Feb 2008 08:11:34 +0000 Subject: [PATCH] Fix crash in output of huge numbers. --- ChangeLog | 6 ++++++ NEWS | 9 +++++++++ src/integer/conv/cl_I_to_digits.cc | 2 +- src/integer/output/cl_I_print_string.cc | 2 +- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7b563d5..691a149 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-02-06 Richard B. Kreckel + + Fix crash in output of huge numbers: + * src/integer/conv/cl_I_to_digits.cc: Make erglen uintC. + * src/integer/output/cl_I_print_string.cc: Make B_baselen uintC. + 2007-02-04 Richard B. Kreckel Fix cl_F output of more than 2^32 decimal digits: diff --git a/NEWS b/NEWS index 68db4db..7e2f676 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,12 @@ +2008-mm-dd, version 1.2.1 +========================= + +Implementation changes +---------------------- + +* Fixed some bugs in the output of numbers larger than 2^32 decimal digits. + + 2008-01-19, version 1.2.0 ========================= diff --git a/src/integer/conv/cl_I_to_digits.cc b/src/integer/conv/cl_I_to_digits.cc index c383952..cd213c0 100644 --- a/src/integer/conv/cl_I_to_digits.cc +++ b/src/integer/conv/cl_I_to_digits.cc @@ -191,7 +191,7 @@ void I_to_digits (const cl_I& X, uintD base, cl_digits* erg) #endif var const cl_I& X1 = q; var const cl_I& X0 = r; - var uintL B_baselen = (uintL)(k)<LSBptr -= B_baselen; I_to_digits(X1,base,erg); diff --git a/src/integer/output/cl_I_print_string.cc b/src/integer/output/cl_I_print_string.cc index d3d1068..1ba99ae 100644 --- a/src/integer/output/cl_I_print_string.cc +++ b/src/integer/output/cl_I_print_string.cc @@ -32,7 +32,7 @@ char * print_integer_to_string (unsigned int base, const cl_I& z) I_to_digits(abs_z,(uintD)base,&erg); // Umwandlung in Ziffern // Vorzeichen ankleben: var char* ergptr = (char*)erg.MSBptr; - var uintL erglen = erg.len; + var uintC erglen = erg.len; if (minus_p) { *--ergptr = '-'; erglen++;