Issue #1971 - Part 2: Update ICU source to 63.2.

This commit is contained in:
Job Bautista 2022-07-24 21:03:27 +08:00 committed by roytam1
commit 1e69214382
3160 changed files with 275815 additions and 234203 deletions

View file

@ -1,4 +1,4 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
@ -8,7 +8,7 @@
*
*******************************************************************************
* file name: umsg.cpp
* encoding: US-ASCII
* encoding: UTF-8
* tab size: 8 (not used)
* indentation:4
*
@ -321,7 +321,7 @@ umsg_applyPattern(UMessageFormat *fmt,
if(status ==NULL||U_FAILURE(*status)){
return ;
}
if(fmt==NULL||pattern==NULL||patternLength<-1){
if(fmt==NULL || (pattern==NULL && patternLength!=0) || patternLength<-1) {
*status=U_ILLEGAL_ARGUMENT_ERROR;
return ;
}
@ -329,10 +329,8 @@ umsg_applyPattern(UMessageFormat *fmt,
if(parseError==NULL){
parseError = &tErr;
}
if(patternLength<-1){
patternLength=u_strlen(pattern);
}
// UnicodeString(pattern, -1) calls u_strlen().
((MessageFormat*)fmt)->applyPattern(UnicodeString(pattern,patternLength),*parseError,*status);
}