(mail_next): Do not allow the cursor to grow past total number of messages.
Showing
1 changed file
with
3 additions
and
0 deletions
... | @@ -27,9 +27,12 @@ mail_next (int argc, char **argv) | ... | @@ -27,9 +27,12 @@ mail_next (int argc, char **argv) |
27 | { | 27 | { |
28 | if (argc < 2) | 28 | if (argc < 2) |
29 | { | 29 | { |
30 | if (cursor < total) | ||
31 | { | ||
30 | cursor++; | 32 | cursor++; |
31 | realcursor++; | 33 | realcursor++; |
32 | } | 34 | } |
35 | } | ||
33 | else | 36 | else |
34 | { | 37 | { |
35 | msgset_t *list = NULL; | 38 | msgset_t *list = NULL; | ... | ... |
-
Please register or sign in to post a comment