src/hb-object-private.hh | 6 +++++- src/hb-ot-shape-normalize.cc | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-)
New commits: commit 89d89646e8163b6c0874b9a3c14d4da974ea8219 Author: Behdad Esfahbod <[email protected]> Date: Mon Oct 17 11:50:54 2011 -0700 Fix intrin.h b0rkage with older MSVC Reported by Jonathan Kew. diff --git a/src/hb-object-private.hh b/src/hb-object-private.hh index 72ed8ba..6a2f83d 100644 --- a/src/hb-object-private.hh +++ b/src/hb-object-private.hh @@ -63,7 +63,7 @@ typedef volatile int hb_atomic_int_t; #define hb_atomic_int_set(AI, V) g_atomic_int_set (&(AI), V) -#elif defined(_MSC_VER) +#elif _MSC_VER >= 1600 #include <intrin.h> @@ -75,7 +75,11 @@ typedef long hb_atomic_int_t; #else +#ifdef _MSC_VER +#pragma message("Could not find any system to define atomic_int macros, library will NOT be thread-safe") +#else #warning "Could not find any system to define atomic_int macros, library will NOT be thread-safe" +#endif typedef volatile int hb_atomic_int_t; #define hb_atomic_int_add(AI, V) ((AI) += (V), (AI) - (V)) commit af913c5788e600e36d29f44fe4e77db84cf8c442 Author: Behdad Esfahbod <[email protected]> Date: Mon Oct 17 11:39:28 2011 -0700 Fix infinite loop in normalization code with variation selectors Reported by Jonathan Kew. diff --git a/src/hb-ot-shape-normalize.cc b/src/hb-ot-shape-normalize.cc index 6d516c5..eb9f32a 100644 --- a/src/hb-ot-shape-normalize.cc +++ b/src/hb-ot-shape-normalize.cc @@ -143,8 +143,11 @@ decompose_multi_char_cluster (hb_ot_shape_context_t *c, { /* TODO Currently if there's a variation-selector we give-up, it's just too hard. */ for (unsigned int i = c->buffer->idx; i < end; i++) - if (unlikely (is_variation_selector (c->buffer->info[i].codepoint))) + if (unlikely (is_variation_selector (c->buffer->info[i].codepoint))) { + while (c->buffer->idx < end) + c->buffer->next_glyph (); return; + } while (c->buffer->idx < end) decompose_current_glyph (c, FALSE); _______________________________________________ HarfBuzz mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/harfbuzz
