summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rwxr-xr-xcpp/src/Ice/StringConverter.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/cpp/src/Ice/StringConverter.cpp b/cpp/src/Ice/StringConverter.cpp
index 1d426877379..e6b112fd1bc 100755
--- a/cpp/src/Ice/StringConverter.cpp
+++ b/cpp/src/Ice/StringConverter.cpp
@@ -141,7 +141,10 @@ WindowsStringConverter::toUTF8(const char* sourceStart,
// First convert to UTF-16
//
int sourceSize = sourceEnd - sourceStart;
- assert(sourceSize > 0);
+ if(sourceSize == 0)
+ {
+ return buffer.getMoreBytes(1, 0);
+ }
size_t size = 0;
int writtenWchar = 0;