aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vmime/charsetConverter_icu.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vmime/charsetConverter_icu.cpp b/src/vmime/charsetConverter_icu.cpp
index 56394797..faae7d32 100644
--- a/src/vmime/charsetConverter_icu.cpp
+++ b/src/vmime/charsetConverter_icu.cpp
@@ -433,6 +433,8 @@ void charsetFilteredOutputStream_icu::writeImpl(
}
const size_t uniLength = uniTarget - &uniBuffer[0];
+ if(uniLength == 0)
+ continue;
// Allocate buffer for destination charset
const size_t cpSize = ucnv_getMinCharSize(m_to) * uniLength;
@@ -520,6 +522,8 @@ void charsetFilteredOutputStream_icu::flush() {
}
const size_t uniLength = uniTarget - &uniBuffer[0];
+ if(uniLength == 0)
+ continue;
// Allocate buffer for destination charset
const size_t cpSize = ucnv_getMinCharSize(m_to) * uniLength;