[svn r184] Fixes the mktime bug, when allocating a struct tm varialble.
1.1 --- a/gmyth/src/gmyth_util.c Mon Dec 04 14:01:20 2006 +0000
1.2 +++ b/gmyth/src/gmyth_util.c Mon Dec 04 15:10:05 2006 +0000
1.3 @@ -103,15 +103,15 @@
1.4 g_warning ("GMythUtil: isoformat_to_time converter error!\n");
1.5 return 0;
1.6 } else {
1.7 - struct tm tm_time;
1.8 - tm_time.tm_year = year - 1900;
1.9 - tm_time.tm_mon = month - 1;
1.10 - tm_time.tm_mday = day;
1.11 - tm_time.tm_hour = hour;
1.12 - tm_time.tm_min = min;
1.13 - tm_time.tm_sec = sec;
1.14 + struct tm* tm_time = g_new0( struct tm, 1 );
1.15 + tm_time->tm_year = year - 1900;
1.16 + tm_time->tm_mon = month - 1;
1.17 + tm_time->tm_mday = day;
1.18 + tm_time->tm_hour = hour;
1.19 + tm_time->tm_min = min;
1.20 + tm_time->tm_sec = sec;
1.21
1.22 - return mktime (&tm_time);
1.23 + return mktime (tm_time);
1.24 }
1.25 }
1.26