diff options
| author | Eli Zaretskii | 2023-02-25 17:19:15 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2023-02-25 17:19:15 +0200 |
| commit | ab0cc4e78111167a79bd861cb570ced189303131 (patch) | |
| tree | 04751582a0bbdd90997c51c584ed15d9d203f593 /src | |
| parent | 3b8b23f66df2c52add54b764a37925818c426581 (diff) | |
| download | emacs-ab0cc4e78111167a79bd861cb570ced189303131.tar.gz emacs-ab0cc4e78111167a79bd861cb570ced189303131.zip | |
Fix infloop in bidi.c
* src/bidi.c (bidi_set_paragraph_end): Reset the isolate_level to
zero. Whenever stack_idx is reset to zero, the isolate_level must
also be reset, since there cannot be any isolate status outside of
embeddings. Failure to reset isolate_level will cause us infloop
when we see a PDI. Reported by Matt Beshara <m@mfa.pw>.
Diffstat (limited to 'src')
| -rw-r--r-- | src/bidi.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bidi.c b/src/bidi.c index 93875d243e4..3c26ae19322 100644 --- a/src/bidi.c +++ b/src/bidi.c | |||
| @@ -1126,6 +1126,7 @@ bidi_set_paragraph_end (struct bidi_it *bidi_it) | |||
| 1126 | bidi_it->invalid_levels = 0; | 1126 | bidi_it->invalid_levels = 0; |
| 1127 | bidi_it->invalid_isolates = 0; | 1127 | bidi_it->invalid_isolates = 0; |
| 1128 | bidi_it->stack_idx = 0; | 1128 | bidi_it->stack_idx = 0; |
| 1129 | bidi_it->isolate_level = 0; | ||
| 1129 | bidi_it->resolved_level = bidi_it->level_stack[0].level; | 1130 | bidi_it->resolved_level = bidi_it->level_stack[0].level; |
| 1130 | } | 1131 | } |
| 1131 | 1132 | ||