if (!glyph)
return grub_errno;
err = grub_font_draw_glyph (glyph, color, x, baseline_y);
+ x += glyph->device_width;
grub_free (glyph);
if (err)
return err;
- x += glyph->device_width;
}
grub_free (visual);
if (!out)
return NULL;
grub_memcpy (out, in, sizeof (*in));
- out->combining = grub_malloc (in->ncomb * sizeof (*in));
- if (!out->combining)
+ if (in->combining)
{
- grub_free (out);
- return NULL;
+ out->combining = grub_malloc (in->ncomb * sizeof (*in));
+ if (!out->combining)
+ {
+ grub_free (out);
+ return NULL;
+ }
+ grub_memcpy (out->combining, in->combining, in->ncomb * sizeof (*in));
}
- grub_memcpy (out->combining, in->combining, in->ncomb * sizeof (*in));
return out;
}
msg_len = grub_utf8_to_ucs4 (*unicode_msg, msg_len,
(grub_uint8_t *) msg, -1, 0);
- *last_position = *unicode_msg + msg_len;
+ if (last_position)
+ *last_position = *unicode_msg + msg_len;
return msg_len;
}
|| comb_type == GRUB_UNICODE_COMB_ME
|| comb_type == GRUB_UNICODE_COMB_MN)
last_comb_pointer = out->ncomb;
- n = grub_realloc (out->combining,
+ n = grub_realloc (out->combining,
sizeof (n[0]) * (out->ncomb + 1));
if (!n)
{
grub_errno = GRUB_ERR_NONE;
continue;
}
+ out->combining = n;
for (j = last_comb_pointer; j < out->ncomb; j++)
if (out->combining[j].type > comb_type)