Fix CCL_MOD typo
* src/ccl.c (ccl_driver): Fix typo that disabled the checks for undefined behavior with integer remainder. Problem caught by Oracle Studio 12.6.
This commit is contained in:
parent
a1f603f0a3
commit
aa2739bf1b
1 changed files with 1 additions and 1 deletions
|
@ -1151,7 +1151,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
|
|||
if (!INT_DIVIDE_OVERFLOW (reg[rrr], i))
|
||||
reg[rrr] /= i;
|
||||
break;
|
||||
case CCL_MOD: reg[rrr] %= i; break;
|
||||
case CCL_MOD:
|
||||
if (!i)
|
||||
CCL_INVALID_CMD;
|
||||
reg[rrr] = i == -1 ? 0 : reg[rrr] % i;
|
||||
|
|
Loading…
Add table
Reference in a new issue