diff options
author | Rüdiger Timm <rt@openoffice.org> | 2004-03-30 12:48:06 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2004-03-30 12:48:06 +0000 |
commit | a6cfea142afd48f789aea4d685fa307da49ad5b7 (patch) | |
tree | 1eb10d6d00d889dafd43f773f1692d27babe684c /psprint | |
parent | f4bcdf11c4014de3ded3d872bac8633ffd9fbfb0 (diff) |
INTEGRATION: CWS vcl20 (1.4.12); FILE MERGED
2004/02/23 17:02:08 pl 1.4.12.1: #115528# do not use strcpy and friends
Diffstat (limited to 'psprint')
-rw-r--r-- | psprint/source/helper/strhelper.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/psprint/source/helper/strhelper.cxx b/psprint/source/helper/strhelper.cxx index 4ea506be2bb6..92804db0f2f3 100644 --- a/psprint/source/helper/strhelper.cxx +++ b/psprint/source/helper/strhelper.cxx @@ -2,9 +2,9 @@ * * $RCSfile: strhelper.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: obo $ $Date: 2004-03-17 10:50:52 $ + * last change: $Author: rt $ $Date: 2004-03-30 13:48:06 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -63,9 +63,9 @@ #include <ieeefp.h> // finite #include <alloca.h> #endif -#include <stdlib.h> -#include <math.h> // for isnan -#include <string.h> // strcpy +#include <cstdlib> +#include <cmath> // for isnan +#include <cstring> namespace psp { @@ -643,19 +643,19 @@ int getValueOfDouble( char* pBuffer, double f, int nPrecision ) if( ! finite( f ) ) { - strcpy( pBuffer, "Inf" ); + strncpy( pBuffer, "Inf", 3 ); return 3; } if( isnan( f ) ) { - strcpy( pBuffer, "NaN" ); + strncpy( pBuffer, "NaN", 3 ); return 3; } if( f == 0.0 ) { - strcpy( pBuffer, "0" ); + strncpy( pBuffer, "0", 3 ); return 1; } |