mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 23:10:40 +00:00
ICU-8972 genprops: minor fix, guard against nv=-100
X-SVN-Rev: 31149
This commit is contained in:
parent
aa743a0d86
commit
cb626ab6d7
1 changed files with 2 additions and 2 deletions
|
@ -323,11 +323,11 @@ encodeNumericValue(UChar32 start, const char *s, UErrorCode &errorCode) {
|
|||
|
||||
if(ntv<0) {
|
||||
// pass
|
||||
} else if(den==0) {
|
||||
} else if(den==0 && value>=0) {
|
||||
if(exp==2 && (value*100)<=UPROPS_NTV_MAX_SMALL_INT) {
|
||||
/* small integer parsed like a large one */
|
||||
ntv=UPROPS_NTV_NUMERIC_START+value*100;
|
||||
} else if(exp==0 && value>=0) {
|
||||
} else if(exp==0) {
|
||||
if(value<=UPROPS_NTV_MAX_SMALL_INT) {
|
||||
/* small integer */
|
||||
ntv=UPROPS_NTV_NUMERIC_START+value;
|
||||
|
|
Loading…
Add table
Reference in a new issue