mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-06 22:15:31 +00:00
ICU-447 Fixed TConverter_fromUnicode_XBCS to return the error value when only the lead surrogate character is present and flush=TRUE
X-SVN-Rev: 1759
This commit is contained in:
parent
96a453126e
commit
32e5cad58f
2 changed files with 8 additions and 4 deletions
|
@ -448,7 +448,8 @@ static void T_UConverter_fromUnicode_MBCS (UConverter * _this,
|
|||
_this->invalidUCharLength = 1;
|
||||
if (UTF_IS_LEAD(mySource[mySourceIndex-1]))
|
||||
{
|
||||
if (mySource < sourceLimit)
|
||||
/*if (mySource < sourceLimit)*/
|
||||
if(mySourceIndex < sourceLength)
|
||||
{
|
||||
if (UTF_IS_TRAIL(mySource[mySourceIndex]))
|
||||
{
|
||||
|
@ -615,7 +616,8 @@ static void T_UConverter_fromUnicode_MBCS_OFFSETS_LOGIC (UConverter * _this,
|
|||
_this->invalidUCharLength = 1;
|
||||
if (UTF_IS_LEAD(mySource[mySourceIndex-1]))
|
||||
{
|
||||
if (mySource < sourceLimit)
|
||||
/*if (mySource < sourceLimit)*/
|
||||
if(mySourceIndex < sourceLength)
|
||||
{
|
||||
if (UTF_IS_TRAIL(mySource[mySourceIndex]))
|
||||
{
|
||||
|
|
|
@ -208,7 +208,8 @@ void T_UConverter_fromUnicode_SBCS (UConverter * _this,
|
|||
_this->invalidUCharLength = 1;
|
||||
if (UTF_IS_LEAD(mySource[mySourceIndex-1]))
|
||||
{
|
||||
if (mySource < sourceLimit)
|
||||
/*if (mySource < sourceLimit)*/
|
||||
if(mySourceIndex < sourceLength)
|
||||
{
|
||||
if (UTF_IS_TRAIL(mySource[mySourceIndex]))
|
||||
{
|
||||
|
@ -607,7 +608,8 @@ void T_UConverter_fromUnicode_DBCS (UConverter * _this,
|
|||
_this->invalidUCharLength = 1;
|
||||
if (UTF_IS_LEAD(mySource[mySourceIndex-1]))
|
||||
{
|
||||
if (mySource < sourceLimit)
|
||||
/*if (mySource < sourceLimit)*/
|
||||
if(mySourceIndex < sourceLength)
|
||||
{
|
||||
if (UTF_IS_TRAIL(mySource[mySourceIndex]))
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue