Skip to content

Commit

Permalink
Fix types of temporary variables in aarch64 extend_integer_type (libf…
Browse files Browse the repository at this point in the history
…fi#745)

Fixes truncated values in weston-info output.
  • Loading branch information
icecream95 authored Oct 23, 2022
1 parent f7233db commit af0f14c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/aarch64/ffi.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,20 +342,20 @@ extend_integer_type (void *source, int type)
}
case FFI_TYPE_SINT16:
{
SINT8 s16;
SINT16 s16;
memcpy (&s16, source, sizeof (s16));
return s16;
}
case FFI_TYPE_UINT32:
{
UINT8 u32;
UINT32 u32;
memcpy (&u32, source, sizeof (u32));
return u32;
}
case FFI_TYPE_INT:
case FFI_TYPE_SINT32:
{
SINT8 s32;
SINT32 s32;
memcpy (&s32, source, sizeof (s32));
return s32;
}
Expand Down

0 comments on commit af0f14c

Please sign in to comment.