From: Paul Eggert Date: Fri, 1 Jan 2021 20:57:26 +0000 (-0800) Subject: Fix CCL_MOD typo X-Git-Tag: emacs-28.0.90~4434 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=aa2739bf1b9a045d94220b607c03b21dbbb7959d;p=emacs.git 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. --- diff --git a/src/ccl.c b/src/ccl.c index 629cb70294f..7c033afc882 100644 --- 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;