diff options
-rw-r--r-- | sal/qa/rtl/textenc/rtl_textcvt.cxx | 9 | ||||
-rw-r--r-- | sal/textenc/tcvtmb.cxx | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/sal/qa/rtl/textenc/rtl_textcvt.cxx b/sal/qa/rtl/textenc/rtl_textcvt.cxx index af9ccca345e7..068e727d53cb 100644 --- a/sal/qa/rtl/textenc/rtl_textcvt.cxx +++ b/sal/qa/rtl/textenc/rtl_textcvt.cxx @@ -1765,6 +1765,15 @@ void Test::testComplex() { RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR }, #if WITH_LOCALE_ALL || WITH_LOCALE_ja { RTL_TEXTENCODING_SHIFT_JIS, + RTL_CONSTASCII_STRINGPARAM("\x00"), + {0x0000}, + 1, + true, + true, + true, + false, + RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR }, + { RTL_TEXTENCODING_SHIFT_JIS, RTL_CONSTASCII_STRINGPARAM( "\x87\x40\x87\x41\x87\x42\x87\x43\x87\x44\x87\x45\x87\x46" "\x87\x47\x87\x48\x87\x49\x87\x4A\x87\x4B\x87\x4C\x87\x4D" diff --git a/sal/textenc/tcvtmb.cxx b/sal/textenc/tcvtmb.cxx index 4e990cc1e91e..89e89c56c628 100644 --- a/sal/textenc/tcvtmb.cxx +++ b/sal/textenc/tcvtmb.cxx @@ -320,7 +320,7 @@ sal_Size ImplUnicodeToDBCS( const void* pData, SAL_UNUSED_PARAMETER void*, } } - if ( !cConv ) + if (cConv == 0 && c != 0) { if ( nFlags & RTL_UNICODETOTEXT_FLAGS_UNDEFINED_REPLACE ) { |