diff options
-rw-r--r-- | unpack.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -79,7 +79,7 @@ static void read_fields(struct dest dest, const void *src_, enum pack_endian end vals = val.unsigned_; } else { vals = minval(s); - vals += val.unsigned_ ^ (UINTMAX_C(1) << (s * 8 - 1)); + vals += (intmax_t)(val.unsigned_ ^ (UINTMAX_C(1) << (s * 8 - 1))); } val.signed_ = vals; tr_debug("val.s: %" PRIdMAX, val.signed_); |