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:
Madhu K 2000-07-08 00:03:18 +00:00
parent 96a453126e
commit 32e5cad58f
2 changed files with 8 additions and 4 deletions

View File

@ -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]))
{

View File

@ -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]))
{