summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
Diffstat (limited to 'sal')
-rw-r--r--sal/textenc/handleundefinedunicodetotextchar.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sal/textenc/handleundefinedunicodetotextchar.cxx b/sal/textenc/handleundefinedunicodetotextchar.cxx
index 6ea1dad81dac..7ff7bd0924a9 100644
--- a/sal/textenc/handleundefinedunicodetotextchar.cxx
+++ b/sal/textenc/handleundefinedunicodetotextchar.cxx
@@ -108,7 +108,7 @@ bool sal::detail::textenc::handleUndefinedUnicodeToTextChar(
/* one replacement character */
if (ImplIsHighSurrogate(c))
{
- if ( *ppSrcBuf == pEndSrcBuf )
+ if ( ((*ppSrcBuf) + 1) == pEndSrcBuf )
{
*pInfo |= RTL_UNICODETOTEXT_INFO_ERROR | RTL_UNICODETOTEXT_INFO_SRCBUFFERTOSMALL;
return false;