]> www.ginac.de Git - cln.git/commitdiff
Fix crash in output of huge numbers.
authorRichard Kreckel <kreckel@ginac.de>
Wed, 6 Feb 2008 08:11:34 +0000 (08:11 +0000)
committerRichard Kreckel <kreckel@ginac.de>
Wed, 6 Feb 2008 08:11:34 +0000 (08:11 +0000)
ChangeLog
NEWS
src/integer/conv/cl_I_to_digits.cc
src/integer/output/cl_I_print_string.cc

index 7b563d55ef0fa5c2fe51e538539e0635f4387658..691a149a1136c1ad427295c5e4fea511eacb615d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-02-06  Richard B. Kreckel  <kreckel@ginac.de>
+
+       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  <kreckel@ginac.de>
 
        Fix cl_F output of more than 2^32 decimal digits:
diff --git a/NEWS b/NEWS
index 68db4dbab29a8a94a0325b37986d60457f939c4e..7e2f676067a7ef199617888aeaf5dc2139381511 100644 (file)
--- 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
 =========================
 
index c383952f3e5c912d380d5e6dbf3a4070ae57f601..cd213c09d141d3f1b22df9336e7cbd6270b09c0c 100644 (file)
@@ -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)<<i;
+          var uintC B_baselen = (uintC)(k)<<i;
           I_to_digits_noshrink(X0,base,B_baselen,erg);
           erg->LSBptr -= B_baselen;
           I_to_digits(X1,base,erg);
index d3d1068cae3ad00cac1c42bd7ec0fb305ae2f469..1ba99aea1c6b59ee759ba47e322408c570c8a25d 100644 (file)
@@ -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++;