Skip to content
Snippets Groups Projects
Commit bf1cae28 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Fix CID 174496: Integer handling issues (BAD_SHIFT)

Don't repeat call atoi() unnecessarily.
parent f0b0e4ef
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
...@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment