Change-Id: I13ebe6e928c942f0d57e81006c88ccbccca28793
Signed-off-by: Hokwon Song <hokwon.song@samsung.com>
SysAssertf(_pCalendarImpl != null, "Not yet constructed! Construct() should be called before use.");
const Calendar* pOtherInstance = dynamic_cast< const Calendar* >(&obj);
- if ((pOtherInstance == null) || (pOtherInstance->_pCalendarImpl == null))
+ if ((pOtherInstance == null) || (pOtherInstance->_pCalendarImpl == null) || GetType() != pOtherInstance->GetType())
{
return false;
}
wchar_t*
_GsmEncodingCore::DecodeN(const byte* pSrc, int srcLength, int& retLength)
{
+ if (srcLength > 1 && pSrc && pSrc[srcLength - 1] == '\0')
+ {
+ --srcLength;
+ }
+
result r = GetCharCount(pSrc, srcLength, retLength);
SysTryReturn(NID_TEXT, !IsFailed(r), null, r, "[%s] Encoding failed", GetErrorMessage(r));