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