sal/inc/rtl/string.hxx | 1 + sal/inc/rtl/ustring.hxx | 1 + sal/qa/rtl/strings/test_strings_valuex.cxx | 1 - 3 files changed, 2 insertions(+), 1 deletion(-)
New commits: commit c881b1b50e3be023efd4dfdebddd002545ed71b3 Author: LuboÅ¡ LuÅák <l.lu...@suse.cz> Date: Fri Jan 18 19:43:17 2013 +0100 long and long long can be the same size (and thus also sal_Int64) Change-Id: I3961ec27d23915b038c3a803dc71e7d937ca331c diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx index 325fe28..c04cd13 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 c87978f..c0370ff 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 ) ); diff --git a/sal/qa/rtl/strings/test_strings_valuex.cxx b/sal/qa/rtl/strings/test_strings_valuex.cxx index d350b0f..9573b19 100644 --- a/sal/qa/rtl/strings/test_strings_valuex.cxx +++ b/sal/qa/rtl/strings/test_strings_valuex.cxx @@ -70,7 +70,6 @@ void testInt() { assert( sizeof( long ) <= sizeof( sal_Int64 )); assert( sizeof( long long ) <= sizeof( sal_Int64 )); assert( sizeof( unsigned int ) < sizeof( sal_Int64 )); - assert( sizeof( unsigned long ) < sizeof( sal_Int64 )); } void test::strings::valueX::testOUInt() {
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits