The above piece of code giving some out of bound access error by some Static code analyser. The iDay is used for Date: ie: 1 - 31.Code:WORD iDay; TCHAR text[3]; _stprintf_s(text, sizeof(text), _T("%d"), iDay);
What should be the proper check to avoid this instead of using a CString in place or TCHAR. ?