gbaconv

A set of tools aimed at GameBoy Advance developers
Log | Files | Refs | README | LICENSE

commit 4e709af3213fc30aafe24412807ad5a09d821be9
parent d0754988ed5ed0cd931c3768ac801662ba5dd653
Author: Frederic Cambus <fred@statdns.com>
Date:   Thu, 15 Oct 2020 15:46:42 +0200

Use __attribute__((packed)) on structures.

Diffstat:
Mpcx2gba.c | 2+-
Mwav2gba.c | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pcx2gba.c b/pcx2gba.c @@ -45,7 +45,7 @@ struct pcx_header { uint16_t x_screen_size; uint16_t y_screen_size; uint8_t filler[54]; -} pcx_header; +} __attribute__((packed)) pcx_header; unsigned char pcx_image_palette[PCX_PALETTE_LENGTH]; unsigned char *pcx_buffer; diff --git a/wav2gba.c b/wav2gba.c @@ -38,7 +38,7 @@ struct wave_header { unsigned short int bits_per_sample; char data_chunk[4]; unsigned int data_chunk_size; -} wave_header; +} __attribute__((packed)) wave_header; int main(int argc, char *argv[]) {