Commit be832493 be8324936f0f2e2a5defc0f55ec73317f0045ee0 by Sergey Poznyakoff

(mail_next): Do not allow the cursor to grow past total number of messages.

1 parent d73acb77
...@@ -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;
......