When attempting to load a `lastditch' timezone (e.g., because the load
of the user's timezone failed), don't bail if the specified timezone doesn't have an offset; in this case it isn't going to. (Perhaps it would be better to change the caller to always supply one, but this is quick and clean and fixes the bug in the easiest possible way.) Should be in 2.2. Fixes (properly) PR#1740.
This commit is contained in:
parent
332bf00316
commit
525a12e989
|
@ -724,18 +724,19 @@ const int lastditch;
|
|||
name += stdlen;
|
||||
if (stdlen >= sizeof sp->chars)
|
||||
stdlen = (sizeof sp->chars) - 1;
|
||||
stdoffset = 0;
|
||||
} else {
|
||||
name = getzname(name);
|
||||
stdlen = name - stdname;
|
||||
if (stdlen < 3)
|
||||
return -1;
|
||||
}
|
||||
if (*name == '\0')
|
||||
return -1; /* was "stdoffset = 0;" */
|
||||
else {
|
||||
name = getoffset(name, &stdoffset);
|
||||
if (name == NULL)
|
||||
return -1;
|
||||
if (*name == '\0')
|
||||
return -1; /* was "stdoffset = 0;" */
|
||||
else {
|
||||
name = getoffset(name, &stdoffset);
|
||||
if (name == NULL)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
load_result = tzload(TZDEFRULES, sp);
|
||||
if (load_result != 0)
|
||||
|
|
Loading…
Reference in New Issue