diff --git a/src/sbbs3/scfg/scfgxtrn.c b/src/sbbs3/scfg/scfgxtrn.c index 320b1cf69f578c419b714d6b18be4e5448a36b92..adece05dcf10828ffb85fff6097d744931178455 100644 --- a/src/sbbs3/scfg/scfgxtrn.c +++ b/src/sbbs3/scfg/scfgxtrn.c @@ -666,8 +666,9 @@ void tevents_cfg() ,str,50,K_EDIT); cfg.event[i]->months=0; for(p=str;*p;p++) { - if(atoi(p)) { - cfg.event[i]->months|=(1<<(atoi(p)-1)); + int num = atoi(p); + if(num > 0) { + cfg.event[i]->months|=(1<<(num-1)); while(*p && IS_DIGIT(*p)) p++; } else {