ICU-418 fix latin-1 ucnv_getNextUChar() - zero-extend, not sign-extend, input byte

X-SVN-Rev: 1543
This commit is contained in:
Markus Scherer 2000-06-02 00:05:22 +00:00
parent e7a7e26131
commit 84a56632ae

View file

@ -137,8 +137,9 @@ static UChar32 T_UConverter_getNextUChar_LATIN_1(UConverter* converter,
*err = U_INDEX_OUTOFBOUNDS_ERROR;
return 0xFFFD;
}
return (UChar)*((*source)++);
/* make sure that we zero-extend, not sign-extend, the byte */
return (UChar)(uint8_t)*((*source)++);
}
static const UConverterImpl _Latin1Impl={