Fix types of temporary variables in aarch64 extend_integer_type (#745)
authorIcecream95 <the.real.icecream95@gmail.com>
Sun, 23 Oct 2022 15:08:10 +0000 (04:08 +1300)
committerGitHub <noreply@github.com>
Sun, 23 Oct 2022 15:08:10 +0000 (11:08 -0400)
Fixes truncated values in weston-info output.

src/aarch64/ffi.c

index dc6338bc2a5c370f48ed7d0d64ae700d25e255be..6544ac0fe3e1c5410abb7d063ffc226ed91a9568 100644 (file)
@@ -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;
       }