]> Git Repo - qemu.git/blobdiff - disas/m68k.c
spapr_drc: use g_strdup_printf() instead of snprintf()
[qemu.git] / disas / m68k.c
index 073abb9efd7e76a90bdaca4a19a1a512cce510e8..61b689ef3ec1cea9e2c9071fafde2490b62b0a2e 100644 (file)
@@ -4685,10 +4685,11 @@ get_field (const unsigned char *data, enum floatformat_byteorders order,
        /* This is the last byte; zero out the bits which are not part of
           this field.  */
        result |=
-         (*(data + cur_byte) & ((1 << (len - cur_bitshift)) - 1))
+         (unsigned long)(*(data + cur_byte)
+                         & ((1 << (len - cur_bitshift)) - 1))
            << cur_bitshift;
       else
-       result |= *(data + cur_byte) << cur_bitshift;
+       result |= (unsigned long)*(data + cur_byte) << cur_bitshift;
       cur_bitshift += FLOATFORMAT_CHAR_BIT;
       if (order == floatformat_little)
        ++cur_byte;
This page took 0.022211 seconds and 4 git commands to generate.