ICU-43 correct SBCS conversion handling of (UChar)0 to (char)0

X-SVN-Rev: 1417
This commit is contained in:
Markus Scherer 2000-05-20 00:17:47 +00:00
parent 335e7a1731
commit 43749d6ef2

View File

@ -182,7 +182,7 @@ void T_UConverter_fromUnicode_SBCS (UConverter * _this,
myTarget[myTargetIndex++] = targetChar;
}
}
if (targetChar == 0 && !mySource[mySourceIndex-1])
if (targetChar == 0 && mySource[mySourceIndex-1] != 0)
{
*err = U_INVALID_CHAR_FOUND;
_this->invalidUCharBuffer[0] = (UChar)mySource[mySourceIndex - 1];