浏览代码

core: use ULL constant to induce value size

(cherry picked from commit cb915a518106c49c2d71308396feee9ba5149e39)
Daniel-Constantin Mierla 5 月之前
父节点
当前提交
7c3475af29
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/core/utils/tmrec.c

+ 1 - 1
src/core/utils/tmrec.c

@@ -1030,7 +1030,7 @@ int check_freq_interval(tmrec_t *_trp, ac_tm_t *_atp)
 						   ? REC_MATCH
 						   : REC_NOMATCH;
 		case FREQ_MONTHLY:
-			_t0 = (_atp->t.tm_year - _trp->ts.tm_year) * 12 + _atp->t.tm_mon
+			_t0 = 12ULL * (_atp->t.tm_year - _trp->ts.tm_year) + _atp->t.tm_mon
 				  - _trp->ts.tm_mon;
 			return (_t0 % _trp->interval == 0) ? REC_MATCH : REC_NOMATCH;
 		case FREQ_YEARLY: