summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/PropertiesI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/PropertiesI.cpp')
-rw-r--r--cpp/src/Ice/PropertiesI.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/cpp/src/Ice/PropertiesI.cpp b/cpp/src/Ice/PropertiesI.cpp
index 09d38acc992..4bd8711b351 100644
--- a/cpp/src/Ice/PropertiesI.cpp
+++ b/cpp/src/Ice/PropertiesI.cpp
@@ -413,13 +413,16 @@ Ice::PropertiesI::parseLine(const string& line, const StringConverterPtr& conver
if(converter)
{
string tmp;
- converter->fromUTF8(reinterpret_cast<const Byte*>(key.data()),
+ converter->fromUTF8(reinterpret_cast<const Byte*>(key.data()),
reinterpret_cast<const Byte*>(key.data() + key.size()), tmp);
key.swap(tmp);
- converter->fromUTF8(reinterpret_cast<const Byte*>(value.data()),
- reinterpret_cast<const Byte*>(value.data() + value.size()), tmp);
- value.swap(tmp);
+ if(!value.empty())
+ {
+ converter->fromUTF8(reinterpret_cast<const Byte*>(value.data()),
+ reinterpret_cast<const Byte*>(value.data() + value.size()), tmp);
+ value.swap(tmp);
+ }
}
setProperty(key, value);