* Fixed bug #2616, preparseDate() would clear the elements array beyond its

maximal size.
* Turned off debug output accidently enabled with the last commit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27006 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2008-08-17 15:00:25 +00:00
parent e6a9c269be
commit de4daffba0

View File

@ -14,9 +14,9 @@
#include <OS.h>
#define TRACE_PARSEDATE 1
#define TRACE_PARSEDATE 0
#if TRACE_PARSEDATE
# define TRACE(x) debug_printf x ;
# define TRACE(x) printf x ;
#else
# define TRACE(x) ;
#endif
@ -482,7 +482,8 @@ preparseDate(const char* dateString, parsed_element* elements)
index++;
}
memset(&elements[index], 0, sizeof(parsed_element));
if (index < MAX_ELEMENTS)
memset(&elements[index], 0, sizeof(parsed_element));
}
// were there any elements?