parent
c306410cab
commit
dac86026a6
|
@ -299,9 +299,11 @@ hb_language_from_string (const char *str, int len)
|
||||||
|
|
||||||
if (len >= 0)
|
if (len >= 0)
|
||||||
{
|
{
|
||||||
|
/* NUL-terminate it. */
|
||||||
len = MIN (len, (int) sizeof (strbuf) - 1);
|
len = MIN (len, (int) sizeof (strbuf) - 1);
|
||||||
str = (char *) memcpy (strbuf, str, len);
|
memcpy (strbuf, str, len);
|
||||||
strbuf[len] = '\0';
|
strbuf[len] = '\0';
|
||||||
|
str = strbuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
hb_language_item_t *item = lang_find_or_insert (str);
|
hb_language_item_t *item = lang_find_or_insert (str);
|
||||||
|
|
|
@ -513,7 +513,7 @@ struct Feature
|
||||||
closure->list_base && closure->list_base < this)
|
closure->list_base && closure->list_base < this)
|
||||||
{
|
{
|
||||||
unsigned int new_offset_int = (unsigned int) orig_offset -
|
unsigned int new_offset_int = (unsigned int) orig_offset -
|
||||||
((char *) this - (char *) closure->list_base);
|
(((char *) this) - ((char *) closure->list_base));
|
||||||
|
|
||||||
Offset new_offset;
|
Offset new_offset;
|
||||||
/* Check that it did not overflow. */
|
/* Check that it did not overflow. */
|
||||||
|
|
|
@ -193,7 +193,7 @@ ASSERT_STATIC (sizeof (hb_var_int_t) == 4);
|
||||||
|
|
||||||
/* Check _assertion in a method environment */
|
/* Check _assertion in a method environment */
|
||||||
#define _ASSERT_POD1(_line) \
|
#define _ASSERT_POD1(_line) \
|
||||||
inline void _static_assertion_on_line_##_line (void) const \
|
HB_UNUSED inline void _static_assertion_on_line_##_line (void) const \
|
||||||
{ _ASSERT_INSTANCE_POD1 (_line, *this); /* Make sure it's POD. */ }
|
{ _ASSERT_INSTANCE_POD1 (_line, *this); /* Make sure it's POD. */ }
|
||||||
# define _ASSERT_POD0(_line) _ASSERT_POD1 (_line)
|
# define _ASSERT_POD0(_line) _ASSERT_POD1 (_line)
|
||||||
# define ASSERT_POD() _ASSERT_POD0 (__LINE__)
|
# define ASSERT_POD() _ASSERT_POD0 (__LINE__)
|
||||||
|
|
|
@ -104,8 +104,6 @@ hb_shape_plan_create (hb_face_t *face,
|
||||||
unsigned int num_user_features,
|
unsigned int num_user_features,
|
||||||
const char * const *shaper_list)
|
const char * const *shaper_list)
|
||||||
{
|
{
|
||||||
assert (props->direction != HB_DIRECTION_INVALID);
|
|
||||||
|
|
||||||
hb_shape_plan_t *shape_plan;
|
hb_shape_plan_t *shape_plan;
|
||||||
hb_feature_t *features = NULL;
|
hb_feature_t *features = NULL;
|
||||||
|
|
||||||
|
@ -120,6 +118,8 @@ hb_shape_plan_create (hb_face_t *face,
|
||||||
return hb_shape_plan_get_empty ();
|
return hb_shape_plan_get_empty ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert (props->direction != HB_DIRECTION_INVALID);
|
||||||
|
|
||||||
hb_face_make_immutable (face);
|
hb_face_make_immutable (face);
|
||||||
shape_plan->default_shaper_list = shaper_list == NULL;
|
shape_plan->default_shaper_list = shaper_list == NULL;
|
||||||
shape_plan->face_unsafe = face;
|
shape_plan->face_unsafe = face;
|
||||||
|
|
Loading…
Reference in New Issue