Mercurial > pidgin
comparison libpurple/log.c @ 23975:b789b54c5bb2
purple_str_to_time() didn't necessarily set "rest" under all circumstances.
I'm pretty sure this fixes #4525.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Tue, 26 Aug 2008 22:37:23 +0000 |
parents | d1eee441bf25 |
children | 5ebfa814b9e8 |
comparison
equal
deleted
inserted
replaced
23974:7071b52a0bf4 | 23975:b789b54c5bb2 |
---|---|
885 PurpleLog *log; | 885 PurpleLog *log; |
886 PurpleLogCommonLoggerData *data; | 886 PurpleLogCommonLoggerData *data; |
887 struct tm tm; | 887 struct tm tm; |
888 #if defined (HAVE_TM_GMTOFF) && defined (HAVE_STRUCT_TM_TM_ZONE) | 888 #if defined (HAVE_TM_GMTOFF) && defined (HAVE_STRUCT_TM_TM_ZONE) |
889 long tz_off; | 889 long tz_off; |
890 const char *rest; | 890 const char *rest, *end; |
891 time_t stamp = purple_str_to_time(purple_unescape_filename(filename), FALSE, &tm, &tz_off, &rest); | 891 time_t stamp = purple_str_to_time(purple_unescape_filename(filename), FALSE, &tm, &tz_off, &rest); |
892 char *end; | |
893 | 892 |
894 /* As zero is a valid offset, PURPLE_NO_TZ_OFF means no offset was | 893 /* As zero is a valid offset, PURPLE_NO_TZ_OFF means no offset was |
895 * provided. See util.h. Yes, it's kinda ugly. */ | 894 * provided. See util.h. Yes, it's kinda ugly. */ |
896 if (tz_off != PURPLE_NO_TZ_OFF) | 895 if (tz_off != PURPLE_NO_TZ_OFF) |
897 tm.tm_gmtoff = tz_off - tm.tm_gmtoff; | 896 tm.tm_gmtoff = tz_off - tm.tm_gmtoff; |