(page_move): Fix start msg calculation
Showing
1 changed file
with
2 additions
and
4 deletions
... | @@ -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); | ... | ... |
-
Please register or sign in to post a comment