mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-3748 fix for pointer math
X-SVN-Rev: 15379
This commit is contained in:
parent
a9b964d20c
commit
c4f2106a37
1 changed files with 2 additions and 2 deletions
|
@ -560,8 +560,8 @@ Locale& Locale::init(const char* localeID, UBool canonicalize)
|
|||
// variant may contain @foo or .foo POSIX cruft; remove it
|
||||
separator = uprv_strchr(field[fieldIdx-1], '@');
|
||||
char* sep2 = uprv_strchr(field[fieldIdx-1], '.');
|
||||
if (separator!=0 || sep2!=0) {
|
||||
if (separator > sep2) {
|
||||
if (separator!=NULL || sep2!=NULL) {
|
||||
if (separator==NULL || (sep2!=NULL && separator > sep2)) {
|
||||
separator = sep2;
|
||||
}
|
||||
fieldLen[fieldIdx-1] = separator - field[fieldIdx-1];
|
||||
|
|
Loading…
Add table
Reference in a new issue