ntdll: Use memcpy() in set_float_reg().
The source address might not be aligned although the compiler can expect alignment when using a plain assignment. Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
2716e215df
commit
2e5c2c7cdb
|
@ -3298,7 +3298,8 @@ static void set_int_reg( CONTEXT *context, KNONVOLATILE_CONTEXT_POINTERS *ctx_pt
|
|||
|
||||
static void set_float_reg( CONTEXT *context, KNONVOLATILE_CONTEXT_POINTERS *ctx_ptr, int reg, M128A *val )
|
||||
{
|
||||
*(&context->u.s.Xmm0 + reg) = *val;
|
||||
/* Use a memcpy() to avoid issues if val is misaligned. */
|
||||
memcpy(&context->u.s.Xmm0 + reg, val, sizeof(*val));
|
||||
if (ctx_ptr) ctx_ptr->u.FloatingContext[reg] = val;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue