summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNuno Lopes <nlopess@php.net>2006-09-01 23:25:29 +0000
committerNuno Lopes <nlopess@php.net>2006-09-01 23:25:29 +0000
commit0f6f0896988940fa61f0b0f632117b18f01efdec (patch)
tree1106d92a35f314579e263d864a5ff5f6a74b2b48
parentc8b2f761f6d2e313c3d1952955539d8329aa6400 (diff)
downloadphp-git-0f6f0896988940fa61f0b0f632117b18f01efdec.tar.gz
omg. take #2 to fix the bug. sorry..
-rw-r--r--ext/date/lib/parse_tz.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/date/lib/parse_tz.c b/ext/date/lib/parse_tz.c
index c5a8ed7099..bf7cd80861 100644
--- a/ext/date/lib/parse_tz.c
+++ b/ext/date/lib/parse_tz.c
@@ -196,7 +196,7 @@ static int tz_search(char *timezone, int left, int right, const timelib_tzdb *tz
{
int mid, cmp;
- if (left >= right) {
+ if (left > right) {
return -1; /* not found */
}
@@ -217,7 +217,7 @@ static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const
{
int pos;
- pos = tz_search(timezone, 0, tzdb->index_size, tzdb);
+ pos = tz_search(timezone, 0, tzdb->index_size - 1, tzdb);
if (pos == -1) {
return 0;