Mercurial > pidgin.yaz
comparison libpurple/util.c @ 31973:1e1b598c725e
Zero the struct tm used for purple_str_to_time().
This fixes parsing of date string without times, etc.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Mon, 02 May 2011 15:33:10 +0000 |
parents | c61d3e5ec1da |
children | 380f530c3f86 0d4702446530 |
comparison
equal
deleted
inserted
replaced
31972:a5384cd9b332 | 31973:1e1b598c725e |
---|---|
710 | 710 |
711 if (rest != NULL) | 711 if (rest != NULL) |
712 *rest = NULL; | 712 *rest = NULL; |
713 | 713 |
714 g_return_val_if_fail(timestamp != NULL, 0); | 714 g_return_val_if_fail(timestamp != NULL, 0); |
715 | |
716 memset(&t, 0, sizeof(struct tm)); | |
715 | 717 |
716 str = timestamp; | 718 str = timestamp; |
717 | 719 |
718 /* Strip leading whitespace */ | 720 /* Strip leading whitespace */ |
719 while (g_ascii_isspace(*str)) | 721 while (g_ascii_isspace(*str)) |