* 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:
parent
e6a9c269be
commit
de4daffba0
@ -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?
|
||||
|
Loading…
Reference in New Issue
Block a user