summaryrefslogtreecommitdiffstats
path: root/mbbsd/announce.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/announce.c')
-rw-r--r--mbbsd/announce.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mbbsd/announce.c b/mbbsd/announce.c
index 952f615d..733cd74a 100644
--- a/mbbsd/announce.c
+++ b/mbbsd/announce.c
@@ -1163,6 +1163,12 @@ int a_parse_zindexes(const char *s, a_menu_session_t *sess)
i+1 < _DIM(sess->z_indexes) )
{
sess->z_indexes[i] = atoi(s);
+ // for overflow, ignore all remaining.
+ if (sess->z_indexes[i] < 0)
+ {
+ sess->z_indexes[i] = 0;
+ break;
+ }
// only increase index
if (sess->z_indexes[i])
i++;