summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/indexer.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/inc/indexer.php b/inc/indexer.php
index ca5f552f2..08ad03965 100644
--- a/inc/indexer.php
+++ b/inc/indexer.php
@@ -299,7 +299,7 @@ function idx_addPage($page){
// get page id (this is the linenumber in page.idx)
$pid = array_search("$page\n",$page_idx);
if(!is_int($pid)){
- $pid = count($page_idx)-1;
+ $pid = count($page_idx);
// page was new - write back
if (!idx_appendIndex('page','',"$page\n")){
trigger_error("Failed to write page index", E_USER_ERROR);