Commit bf1cae28 authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Fix CID 174496: Integer handling issues (BAD_SHIFT)

Don't repeat call atoi() unnecessarily.
parent f0b0e4ef
...@@ -666,8 +666,9 @@ void tevents_cfg() ...@@ -666,8 +666,9 @@ void tevents_cfg()
,str,50,K_EDIT); ,str,50,K_EDIT);
cfg.event[i]->months=0; cfg.event[i]->months=0;
for(p=str;*p;p++) { for(p=str;*p;p++) {
if(atoi(p)) { int num = atoi(p);
cfg.event[i]->months|=(1<<(atoi(p)-1)); if(num > 0) {
cfg.event[i]->months|=(1<<(num-1));
while(*p && IS_DIGIT(*p)) while(*p && IS_DIGIT(*p))
p++; p++;
} else { } else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment