From 1abcfcb8449ca6b760f45f2c7e71ca5b8e435f52 Mon Sep 17 00:00:00 2001 From: Kp Date: Sun, 25 Aug 2013 17:15:58 +0000 Subject: [PATCH] Add sanity check that DiskBitmapHeader is the right size This would have caught the -mms-bitfields bug at build time. --- d2x-rebirth/main/piggy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/d2x-rebirth/main/piggy.c b/d2x-rebirth/main/piggy.c index 091469645..88e09a836 100644 --- a/d2x-rebirth/main/piggy.c +++ b/d2x-rebirth/main/piggy.c @@ -130,6 +130,7 @@ typedef struct DiskBitmapHeader { ubyte avg_color; int offset; } __pack__ DiskBitmapHeader; +typedef char padding_check[sizeof(DiskBitmapHeader) == 0x12 ? 1 : -1]; #define DISKBITMAPHEADER_D1_SIZE 17 // no wh_extra