]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix CCL_MOD typo
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 1 Jan 2021 20:57:26 +0000 (12:57 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 1 Jan 2021 20:58:18 +0000 (12:58 -0800)
* src/ccl.c (ccl_driver): Fix typo that disabled the
checks for undefined behavior with integer remainder.
Problem caught by Oracle Studio 12.6.

src/ccl.c

index 629cb70294fc18b3f1b58cee7c6e822f76e9930c..7c033afc88251031f8ec2af72e4360a6cc1dcc4b 100644 (file)
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -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;