Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 4e15936

Browse files
author
Alexander Korotkov
committed
Fix invalid offset calculation in add_page_item()
1 parent f7acfa1 commit 4e15936

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/in_memory/btree_page.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ add_page_item(Page p, OffsetNumber offset, LocationIndex size)
383383
BTREE_PAGE_GET_END_OFFSET(header, offset) -
384384
BTREE_PAGE_GET_START_OFFSET(header, count - 1));
385385

386-
for (i = count + 1; i > offset; i--)
386+
for (i = count; i > offset; i--)
387387
header->items[i] = header->items[i - 1] - size;
388388
}
389389

0 commit comments

Comments
 (0)