From 94a135110007dd2f7fda1efbec4c908aa47546ec Mon Sep 17 00:00:00 2001 From: Michael Steenbeek Date: Tue, 5 Jul 2022 02:42:51 +0200 Subject: [PATCH] Default-initialise rct_g1_element, rct_g1_header (#17501) --- src/openrct2/drawing/Drawing.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/openrct2/drawing/Drawing.h b/src/openrct2/drawing/Drawing.h index 35f0c4c0e5..1d67b5f213 100644 --- a/src/openrct2/drawing/Drawing.h +++ b/src/openrct2/drawing/Drawing.h @@ -79,20 +79,20 @@ struct GamePalette struct rct_g1_element { - uint8_t* offset; // 0x00 - int16_t width; // 0x04 - int16_t height; // 0x06 - int16_t x_offset; // 0x08 - int16_t y_offset; // 0x0A - uint16_t flags; // 0x0C - int32_t zoomed_offset; // 0x0E + uint8_t* offset = nullptr; // 0x00 + int16_t width = 0; // 0x04 + int16_t height = 0; // 0x06 + int16_t x_offset = 0; // 0x08 + int16_t y_offset = 0; // 0x0A + uint16_t flags = 0; // 0x0C + int32_t zoomed_offset = 0; // 0x0E }; #pragma pack(push, 1) struct rct_g1_header { - uint32_t num_entries; - uint32_t total_size; + uint32_t num_entries = 0; + uint32_t total_size = 0; }; assert_struct_size(rct_g1_header, 8); #pragma pack(pop)