Browse Source

timezone parser: fix iteration over search dir paths

try+l points to \0, so only one iteration was ever tried.
rs-1.0
rofl0r 13 years ago
parent
commit
8db1652581
  1. 2
      src/time/__tz.c

2
src/time/__tz.c

@ -162,7 +162,7 @@ static void do_tzset()
break; break;
memcpy(pathname, s, l+1); memcpy(pathname, s, l+1);
pathname[l] = 0; pathname[l] = 0;
for (try=search; !map && *try; try+=l) { for (try=search; !map && *try; try+=l+1) {
l = strlen(try); l = strlen(try);
memcpy(pathname-l, try, l); memcpy(pathname-l, try, l);
map = __map_file(pathname-l, &map_size); map = __map_file(pathname-l, &map_size);

Loading…
Cancel
Save