From: Mattias EngdegÄrd Date: Tue, 6 Dec 2022 11:13:18 +0000 (+0100) Subject: Lisp reader undefined behaviour excision X-Git-Tag: emacs-29.0.90~1342 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9b9b39a2d8979af7430a4e2370ef7857c4a2dbce;p=emacs.git Lisp reader undefined behaviour excision * src/lread.c (read_bool_vector, skip_lazy_string): Replace `|` with `||` to explicitly introduce sequence points since the variables, `length` and `nskip`, are mutated more than once. The `|` was just a weak attempt at micro-optimisation in any case; sorry about that. --- diff --git a/src/lread.c b/src/lread.c index 0a6e4201e40..68bc1431765 100644 --- a/src/lread.c +++ b/src/lread.c @@ -3375,7 +3375,7 @@ read_bool_vector (Lisp_Object readcharfun) break; } if (INT_MULTIPLY_WRAPV (length, 10, &length) - | INT_ADD_WRAPV (length, c - '0', &length)) + || INT_ADD_WRAPV (length, c - '0', &length)) invalid_syntax ("#&", readcharfun); } @@ -3421,7 +3421,7 @@ skip_lazy_string (Lisp_Object readcharfun) break; } if (INT_MULTIPLY_WRAPV (nskip, 10, &nskip) - | INT_ADD_WRAPV (nskip, c - '0', &nskip)) + || INT_ADD_WRAPV (nskip, c - '0', &nskip)) invalid_syntax ("#@", readcharfun); digits++; if (digits == 2 && nskip == 0)