byte* pGsmByte = (byte*) pSrc;
while (srcLength > 1)
{
- SysTryReturnResult(NID_TEXT, not (*pGsmByte & 0x80), E_INVALID_ENCODING_RANGE,
+ SysTryReturnResult(NID_TEXT, not (*pGsmByte & 0x80), E_INVALID_ENCODING_RANGE,
"[%s] Encoding failed. String contains code pointing outside of bounds by GSM encdoing.", GetErrorMessage(E_INVALID_ENCODING_RANGE));
if (*pGsmByte == 0x1B)
{
wchar_t*
_GsmEncodingCore::DecodeN(const byte* pSrc, int srcLength, int& retLength)
{
+ // 0 in GSM is mapped to 0x40 ['@'] in UNICODE, following code is to handle terminating null.
if (srcLength > 1 && pSrc && pSrc[srcLength - 1] == '\0')
{
--srcLength;