Commit 79436259 79436259b62fae7b2ae3b247d2e50832795a8cf9 by Sergey Poznyakoff

(page_move): Fix start msg calculation

1 parent e1384d33
...@@ -183,12 +183,10 @@ page_move (off_t offset) ...@@ -183,12 +183,10 @@ page_move (off_t offset)
183 183
184 check_page_map (); 184 check_page_map ();
185 185
186 if (offset > 0) 186 if (offset < 0 && -offset > page_map[0])
187 start = page_map[cursor] + offset;
188 else if (-offset > page_map[cursor])
189 start = 1; 187 start = 1;
190 else 188 else
191 start = page_map[cursor] + offset; 189 start = page_map[0] + offset;
192 190
193 util_range_msg (start, page_size, 191 util_range_msg (start, page_size,
194 MSG_COUNT|MSG_NODELETED|MSG_SILENT, _fill_map, &count); 192 MSG_COUNT|MSG_NODELETED|MSG_SILENT, _fill_map, &count);
......