mirror of
https://github.com/tmux/tmux.git
synced 2025-04-24 22:01:01 +00:00
Do not take the address of a potentially unaligned member.
This commit is contained in:
parent
c908d2039f
commit
03b2998abe
5
grid.c
5
grid.c
@ -114,6 +114,7 @@ grid_extended_cell(struct grid_line *gl, struct grid_cell_entry *gce,
|
||||
{
|
||||
struct grid_extd_entry *gee;
|
||||
int flags = (gc->flags & ~GRID_FLAG_CLEARED);
|
||||
utf8_char uc;
|
||||
|
||||
if (~gce->flags & GRID_FLAG_EXTENDED)
|
||||
grid_get_extended_cell(gl, gce, flags);
|
||||
@ -121,8 +122,10 @@ grid_extended_cell(struct grid_line *gl, struct grid_cell_entry *gce,
|
||||
fatalx("offset too big");
|
||||
gl->flags |= GRID_LINE_EXTENDED;
|
||||
|
||||
utf8_from_data(&gc->data, &uc);
|
||||
|
||||
gee = &gl->extddata[gce->offset];
|
||||
utf8_from_data(&gc->data, &gee->data);
|
||||
gee->data = uc;
|
||||
gee->attr = gc->attr;
|
||||
gee->flags = flags;
|
||||
gee->fg = gc->fg;
|
||||
|
Loading…
Reference in New Issue
Block a user