Bug with date format parsing in StripFormat() |
Post Reply |
Author | |
ES
Newbie Joined: 02 October 2010 Status: Offline Points: 3 |
Post Options
Thanks(0)
Posted: 02 October 2010 at 6:45am |
Hi,
I've discovered a bug in CXTPCalendarUtils::StripFormat() when running the sample Calendar demo and having a Windows date format containing a text string before the datum, i.e. 'today is 2/10-2010'. Maybe only a local issue as the default Windows date format varies, but nevertheless a bug...(as my localized version of Windows use this type of date format as default). What happens is nIndex becomes -1 before checking IsFormatChar(strFormat[nIndex]), which causes an exception. A simple problem to correct, but I guess it should be done by Codejock in an upcoming release to propagate the fix to all users. I've attached the code snippet below, the first while block finds a '-character in the first position (0) and then subtracts (with nIndex--) twice before ending the loop. Then nIndex++ adds one, but nIndex is still negative when entering the last while block; /ES |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |