ICU-4603 fix beam complaints
X-SVN-Rev: 18388
This commit is contained in:
parent
fc1588e739
commit
b40c443891
@ -869,7 +869,9 @@ DONE:
|
||||
*err = U_UNSUPPORTED_ESCAPE_SEQUENCE;
|
||||
break;
|
||||
}
|
||||
/*fall through*/
|
||||
case GB2312_1:
|
||||
/*fall through*/
|
||||
case CNS_11643_1:
|
||||
myData2022->toU2022State.cs[1]=(int8_t)tempState;
|
||||
break;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
**********************************************************************
|
||||
* Copyright (C) 2000-2004, International Business Machines
|
||||
* Copyright (C) 2000-2005, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
**********************************************************************
|
||||
* file name: ucnvhz.c
|
||||
@ -148,7 +148,8 @@ UConverter_toUnicode_HZ_OFFSETS_LOGIC(UConverterToUnicodeArgs *args,
|
||||
UChar32 targetUniChar = 0x0000;
|
||||
UChar mySourceChar = 0x0000;
|
||||
UConverterDataHZ* myData=(UConverterDataHZ*)(args->converter->extraInfo);
|
||||
|
||||
tempBuf[0]=0;
|
||||
tempBuf[1]=0;
|
||||
if ((args->converter == NULL) || (args->targetLimit < args->target) || (mySourceLimit < args->source)){
|
||||
*err = U_ILLEGAL_ARGUMENT_ERROR;
|
||||
return;
|
||||
@ -261,9 +262,17 @@ SAVE_STATE:
|
||||
*err = U_ILLEGAL_CHAR_FOUND;
|
||||
}
|
||||
if(myData->isStateDBCS){
|
||||
args->converter->toUBytes[0] = (uint8_t)(tempBuf[0]-0x80);
|
||||
args->converter->toUBytes[1] = (uint8_t)(tempBuf[1]-0x80);
|
||||
args->converter->toULength=2;
|
||||
/* this should never occur since isStateDBCS is set to true
|
||||
* only after tempBuf[0] and tempBuf[1]
|
||||
* are set to the input .. just to please BEAM
|
||||
*/
|
||||
if(tempBuf[0]==0 || tempBuf[1]==0){
|
||||
*err = U_INTERNAL_PROGRAM_ERROR;
|
||||
}else{
|
||||
args->converter->toUBytes[0] = (uint8_t)(tempBuf[0]-0x80);
|
||||
args->converter->toUBytes[1] = (uint8_t)(tempBuf[1]-0x80);
|
||||
args->converter->toULength=2;
|
||||
}
|
||||
}
|
||||
else{
|
||||
args->converter->toUBytes[0] = (uint8_t)mySourceChar;
|
||||
|
@ -799,7 +799,7 @@ usprep_prepare( const UStringPrepProfile* profile,
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
if(b2Len <= destCapacity){
|
||||
if(b2Len>0 && b2Len <= destCapacity){
|
||||
uprv_memmove(dest,b2, b2Len*U_SIZEOF_UCHAR);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user