aboutsummaryrefslogtreecommitdiffstats
path: root/src/syntax.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/syntax.c')
-rw-r--r--src/syntax.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/syntax.c b/src/syntax.c
index 56176f32418..1301c0689ad 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -1541,7 +1541,8 @@ skip_chars (int forwardp, Lisp_Object string, Lisp_Object lim, int handle_iso_cl
1541 1541
1542 if (c <= c2) 1542 if (c <= c2)
1543 { 1543 {
1544 while (c <= c2) 1544 unsigned lim2 = c2 + 1;
1545 while (c < lim2)
1545 fastmap[c++] = 1; 1546 fastmap[c++] = 1;
1546 if (! ASCII_CHAR_P (c2)) 1547 if (! ASCII_CHAR_P (c2))
1547 string_has_eight_bit = 1; 1548 string_has_eight_bit = 1;
@@ -1681,7 +1682,8 @@ skip_chars (int forwardp, Lisp_Object string, Lisp_Object lim, int handle_iso_cl
1681 } 1682 }
1682 if (! ASCII_CHAR_P (c)) 1683 if (! ASCII_CHAR_P (c))
1683 { 1684 {
1684 while (leading_code <= leading_code2) 1685 unsigned lim2 = leading_code2 + 1;
1686 while (leading_code < lim2)
1685 fastmap[leading_code++] = 1; 1687 fastmap[leading_code++] = 1;
1686 if (c <= c2) 1688 if (c <= c2)
1687 { 1689 {
@@ -1713,9 +1715,9 @@ skip_chars (int forwardp, Lisp_Object string, Lisp_Object lim, int handle_iso_cl
1713 for (i = 0; i < n_char_ranges; i += 2) 1715 for (i = 0; i < n_char_ranges; i += 2)
1714 { 1716 {
1715 int c1 = char_ranges[i]; 1717 int c1 = char_ranges[i];
1716 int c2 = char_ranges[i + 1]; 1718 unsigned lim2 = char_ranges[i + 1] + 1;
1717 1719
1718 for (; c1 <= c2; c1++) 1720 for (; c1 < lim2; c1++)
1719 { 1721 {
1720 int b = CHAR_TO_BYTE_SAFE (c1); 1722 int b = CHAR_TO_BYTE_SAFE (c1);
1721 if (b >= 0) 1723 if (b >= 0)