diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2007-07-20 12:35:54 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2007-07-20 12:35:54 -0230 |
commit | d5449422a0da8293c1116a8585d942fc626bcfac (patch) | |
tree | c07128d9d38f6e9f4036e560adc4efa2d6aef640 /cpp/src/Ice/PropertiesI.cpp | |
parent | Adding missing Windows projects for evictor demos. (diff) | |
download | ice-d5449422a0da8293c1116a8585d942fc626bcfac.tar.bz2 ice-d5449422a0da8293c1116a8585d942fc626bcfac.tar.xz ice-d5449422a0da8293c1116a8585d942fc626bcfac.zip |
http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=2303 - do not call toUTF8/fromUTF8 with empty string
Diffstat (limited to 'cpp/src/Ice/PropertiesI.cpp')
-rw-r--r-- | cpp/src/Ice/PropertiesI.cpp | 11 |
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); |