summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2014-10-16 09:55:34 +0300
committerEli Zaretskii <eliz@gnu.org>2014-10-16 09:55:34 +0300
commit40018ffb384a50fabfb0147aefe400477d174753 (patch)
treee411edc3942b7077a4e4756ec38c9135aee5d1dc /src
parent10471ae36190f741829cdc490f410b68226a1bb9 (diff)
downloademacs-40018ffb384a50fabfb0147aefe400477d174753.tar.gz
src/bidi.c (bidi_find_bracket_pairs): Avoid a loop that does nothing useful.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/bidi.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 893ad867c2a..af53b77a622 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2014-10-16 Eli Zaretskii <eliz@gnu.org>
+
+ * bidi.c (bidi_find_bracket_pairs): Avoid a loop that does nothing
+ useful.
+
2014-10-15 Paul Eggert <eggert@cs.ucla.edu>
* bidi.c (bidi_find_bracket_pairs): Initialize local var.
diff --git a/src/bidi.c b/src/bidi.c
index 67eb59e7899..bbafc785e7b 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -2472,8 +2472,11 @@ bidi_find_bracket_pairs (struct bidi_it *bidi_it)
default:
break;
}
- for (sp = bpa_sp; sp >= 0; sp--)
- bpa_stack[sp].flags |= flag;
+ if (flag)
+ {
+ for (sp = bpa_sp; sp >= 0; sp--)
+ bpa_stack[sp].flags |= flag;
+ }
}
old_sidx = bidi_it->stack_idx;
type = bidi_resolve_weak (bidi_it);