From 5a43f044db4fb3cf7f82b1c392f51f043cf3bd58 Mon Sep 17 00:00:00 2001 From: Richard Kreckel Date: Mon, 4 Feb 2008 23:51:56 +0000 Subject: [PATCH] Fix cl_F output of more than 2^32 decimal digits: * src/base/string/cl_sstring.cc (cl_sstring): make len uintC. * src/base/string/cl_sstring.h: Likewise. --- ChangeLog | 6 ++++++ src/base/string/cl_sstring.cc | 4 ++-- src/base/string/cl_sstring.h | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 252caa3..7b563d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-02-04 Richard B. Kreckel + + Fix cl_F output of more than 2^32 decimal digits: + * src/base/string/cl_sstring.cc (cl_sstring): make len uintC. + * src/base/string/cl_sstring.h: Likewise. + 2007-01-23 Bruno Haible Allow 64-bit builds on MacOS X 10.5. diff --git a/src/base/string/cl_sstring.cc b/src/base/string/cl_sstring.cc index 0c8a774..b0bc2cd 100644 --- a/src/base/string/cl_sstring.cc +++ b/src/base/string/cl_sstring.cc @@ -13,13 +13,13 @@ namespace cln { -char * cl_sstring (const char * ptr, uintL len) +char * cl_sstring (const char * ptr, uintC len) { var char * string = (char *) malloc_hook(len+1); { var const char* ptr1 = ptr; var char* ptr2 = string; - var uintL count; + var uintC count; for (count = len; count > 0; count--) *ptr2++ = *ptr1++; *ptr2++ = '\0'; diff --git a/src/base/string/cl_sstring.h b/src/base/string/cl_sstring.h index a512140..e6c151e 100644 --- a/src/base/string/cl_sstring.h +++ b/src/base/string/cl_sstring.h @@ -7,7 +7,7 @@ namespace cln { // Liefert einen String. // Mit malloc_hook() alloziert, mit free_hook() freizugeben. -extern char * cl_sstring (const char * ptr, uintL len); +extern char * cl_sstring (const char * ptr, uintC len); } // namespace cln