1
0
Fork 0

Fix undefined behavior in TileLayer (#12125)

Initialize the values properly
main-2-0-4
Daroc Alden 2022-03-11 15:22:49 -05:00 committed by Maksym H
parent 75452a9e9a
commit 8e918bb322
1 changed files with 3 additions and 2 deletions

View File

@ -194,6 +194,7 @@ struct TileLayer
texture_id == other.texture_id &&
material_type == other.material_type &&
material_flags == other.material_flags &&
has_color == other.has_color &&
color == other.color &&
scale == other.scale;
}
@ -284,9 +285,9 @@ struct TileLayer
* The color of the tile, or if the tile does not own
* a color then the color of the node owning this tile.
*/
video::SColor color;
video::SColor color = video::SColor(0, 0, 0, 0);
u8 scale;
u8 scale = 1;
};
/*!