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()
,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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment