mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 04:50:07 +00:00
(__tzfile_compute): For use_last case set i to num_transition rather than num_transitions - 1.
This commit is contained in:
parent
8d137b6098
commit
e2cceb5a74
@ -596,7 +596,7 @@ __tzfile_compute (time_t timer, int use_localtime,
|
||||
if (tzspec == NULL)
|
||||
{
|
||||
use_last:
|
||||
i = num_transitions - 1;
|
||||
i = num_transitions;
|
||||
goto found;
|
||||
}
|
||||
|
||||
@ -666,7 +666,8 @@ __tzfile_compute (time_t timer, int use_localtime,
|
||||
i = hi;
|
||||
|
||||
found:
|
||||
/* assert (timer >= transitions[i - 1] && timer < transitions[i]); */
|
||||
/* assert (timer >= transitions[i - 1]
|
||||
&& (i == num_transitions || timer < transitions[i])); */
|
||||
__tzname[types[type_idxs[i - 1]].isdst]
|
||||
= __tzstring (&zone_names[types[type_idxs[i - 1]].idx]);
|
||||
size_t j = i;
|
||||
|
Loading…
Reference in New Issue
Block a user