mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-18 11:14:22 +00:00
ICU-410 unescape() return an empty string in case of error
X-SVN-Rev: 2298
This commit is contained in:
parent
d0c3e78a48
commit
9708c34d2c
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue