summaryrefslogtreecommitdiff
path: root/inc/changelog.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/changelog.php')
-rw-r--r--inc/changelog.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/inc/changelog.php b/inc/changelog.php
index d2be5b2db..c5c1c8246 100644
--- a/inc/changelog.php
+++ b/inc/changelog.php
@@ -697,6 +697,7 @@ function getRelativeRevision($id, $rev, $direction, $chunk_size = 8192, $media =
if($lookpointer) {
$tail = $head + floor(($tail - $head) / 2);
}
+ if($tail == $head) break;
}
} else {
$tail = $head;
@@ -706,6 +707,7 @@ function getRelativeRevision($id, $rev, $direction, $chunk_size = 8192, $media =
//load next chunck
$lines = readChunk($fp, $head, $tail);
+ if(empty($lines)) break;
}
}
if($uses_chuncks) {