summaryrefslogtreecommitdiff
path: root/thirdparty/harfbuzz/src/hb-ot-shape-complex-thai.cc
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-03-16 21:28:00 +0100
committerGitHub <noreply@github.com>2021-03-16 21:28:00 +0100
commita6066c5e42765a8b41f3e331ffa080ddc9624641 (patch)
tree1a1ddbfb1df077a1f57b1fe9f49e4f646e6c2c60 /thirdparty/harfbuzz/src/hb-ot-shape-complex-thai.cc
parentd71c9f00050ce08917c06c2ec235bc09ea52f5a7 (diff)
parentb79e8c22f09456e0c0fbcc9ccc5de6b3d54f6476 (diff)
Merge pull request #47072 from bruvzg/hb_2_8_0
HarfBuzz: Update to version 2.8.0
Diffstat (limited to 'thirdparty/harfbuzz/src/hb-ot-shape-complex-thai.cc')
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-shape-complex-thai.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/thirdparty/harfbuzz/src/hb-ot-shape-complex-thai.cc b/thirdparty/harfbuzz/src/hb-ot-shape-complex-thai.cc
index 347ea2e7ac..4c3068173b 100644
--- a/thirdparty/harfbuzz/src/hb-ot-shape-complex-thai.cc
+++ b/thirdparty/harfbuzz/src/hb-ot-shape-complex-thai.cc
@@ -323,20 +323,19 @@ preprocess_text_thai (const hb_ot_shape_plan_t *plan,
buffer->clear_output ();
unsigned int count = buffer->len;
- for (buffer->idx = 0; buffer->idx < count && buffer->successful;)
+ for (buffer->idx = 0; buffer->idx < count /* No need for: && buffer->successful */;)
{
hb_codepoint_t u = buffer->cur().codepoint;
- if (likely (!IS_SARA_AM (u))) {
- buffer->next_glyph ();
+ if (likely (!IS_SARA_AM (u)))
+ {
+ if (unlikely (!buffer->next_glyph ())) break;
continue;
}
/* Is SARA AM. Decompose and reorder. */
- hb_glyph_info_t &nikhahit = buffer->output_glyph (NIKHAHIT_FROM_SARA_AM (u));
- _hb_glyph_info_set_continuation (&nikhahit);
- buffer->replace_glyph (SARA_AA_FROM_SARA_AM (u));
- if (unlikely (!buffer->successful))
- return;
+ (void) buffer->output_glyph (NIKHAHIT_FROM_SARA_AM (u));
+ _hb_glyph_info_set_continuation (&buffer->prev());
+ if (unlikely (!buffer->replace_glyph (SARA_AA_FROM_SARA_AM (u)))) break;
/* Make Nikhahit be recognized as a ccc=0 mark when zeroing widths. */
unsigned int end = buffer->out_len;