summaryrefslogtreecommitdiff
path: root/sal/inc/rtl
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2013-01-18 19:43:17 +0100
committerLuboš Luňák <l.lunak@suse.cz>2013-01-18 19:44:06 +0100
commitc881b1b50e3be023efd4dfdebddd002545ed71b3 (patch)
tree118165046e429a421660f3345324f904774e2a63 /sal/inc/rtl
parent8f766122f0c5fbbb5442e1a5dd6f4eab9744d5cd (diff)
long and long long can be the same size (and thus also sal_Int64)
Change-Id: I3961ec27d23915b038c3a803dc71e7d937ca331c
Diffstat (limited to 'sal/inc/rtl')
-rw-r--r--sal/inc/rtl/string.hxx1
-rw-r--r--sal/inc/rtl/ustring.hxx1
2 files changed, 2 insertions, 0 deletions
diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx
index 325fe28af239..c04cd13c81e6 100644
--- a/sal/inc/rtl/string.hxx
+++ b/sal/inc/rtl/string.hxx
@@ -1522,6 +1522,7 @@ public:
*/
static OString number( unsigned long ll, sal_Int16 radix = 10 )
{
+ assert( ll <= SAL_MAX_INT64 ); // valueOfInt64 may not be able to handle the highest bit
sal_Char aBuf[RTL_STR_MAX_VALUEOFINT64];
rtl_String* pNewData = 0;
rtl_string_newFromStr_WithLength( &pNewData, aBuf, rtl_str_valueOfInt64( aBuf, ll, radix ) );
diff --git a/sal/inc/rtl/ustring.hxx b/sal/inc/rtl/ustring.hxx
index c87978f4b067..c0370ffd526d 100644
--- a/sal/inc/rtl/ustring.hxx
+++ b/sal/inc/rtl/ustring.hxx
@@ -2156,6 +2156,7 @@ public:
*/
static OUString number( unsigned long ll, sal_Int16 radix = 10 )
{
+ assert( ll <= SAL_MAX_INT64 ); // valueOfInt64 may not be able to handle the highest bit
sal_Unicode aBuf[RTL_STR_MAX_VALUEOFINT64];
rtl_uString* pNewData = 0;
rtl_uString_newFromStr_WithLength( &pNewData, aBuf, rtl_ustr_valueOfInt64( aBuf, ll, radix ) );