ICU-410 unescape() return an empty string in case of error

X-SVN-Rev: 2298
This commit is contained in:
Markus Scherer 2000-08-16 23:28:24 +00:00
parent d0c3e78a48
commit 9708c34d2c

View file

@ -424,6 +424,7 @@ UnicodeString UnicodeString::unescape() const {
if (c == 0x005C /*'\\'*/) {
c = unescapeAt(i); // advances i
if (c == (UChar32)0xFFFFFFFF) {
result.remove(); // return empty string
break; // invalid escape sequence
}
}