diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-05-05 10:49:55 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-05-12 14:37:27 -0400 |
commit | e57f26c135b03f5dbde77aea24551b6a9fc20889 (patch) | |
tree | 9059812aca333977f2a3f5dcf42b22eb92e483f6 /src/common/compat.c | |
parent | 97c6e717b9f3f198163c6d5b4bde86e7f3da28d0 (diff) | |
download | tor-e57f26c135b03f5dbde77aea24551b6a9fc20889.tar.gz tor-e57f26c135b03f5dbde77aea24551b6a9fc20889.zip |
Have correct_tm set tm_wday as well.
The tm_wday field had been left uninitialized, which was causing
some assertions to fail on Windows unit tests.
Fixes bug 18977.
Diffstat (limited to 'src/common/compat.c')
-rw-r--r-- | src/common/compat.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/compat.c b/src/common/compat.c index d88c5f92de..90132fc1b0 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -2462,6 +2462,7 @@ correct_tm(int islocal, const time_t *timep, struct tm *resultbuf, r->tm_mon = 11; r->tm_mday = 31; r->tm_yday = 365; + r->tm_wday = 6; r->tm_hour = 23; r->tm_min = 59; r->tm_sec = 59; @@ -2479,6 +2480,7 @@ correct_tm(int islocal, const time_t *timep, struct tm *resultbuf, r->tm_mon = 0; r->tm_mday = 1; r->tm_yday = 1; + r->tm_wday = 0; r->tm_hour = 0; r->tm_min = 0 ; r->tm_sec = 0; @@ -2492,6 +2494,7 @@ correct_tm(int islocal, const time_t *timep, struct tm *resultbuf, r->tm_mon = 11; r->tm_mday = 31; r->tm_yday = 365; + r->tm_wday = 6; r->tm_hour = 23; r->tm_min = 59; r->tm_sec = 59; |