mirror of
https://github.com/minetest/minetest.git
synced 2024-12-04 05:23:44 +01:00
Fix undefined behavior in TileLayer (#12125)
Initialize the values properly
This commit is contained in:
parent
4b81ae1b35
commit
6e6cdc834f
@ -195,6 +195,7 @@ struct TileLayer
|
|||||||
texture_id == other.texture_id &&
|
texture_id == other.texture_id &&
|
||||||
material_type == other.material_type &&
|
material_type == other.material_type &&
|
||||||
material_flags == other.material_flags &&
|
material_flags == other.material_flags &&
|
||||||
|
has_color == other.has_color &&
|
||||||
color == other.color &&
|
color == other.color &&
|
||||||
scale == other.scale;
|
scale == other.scale;
|
||||||
}
|
}
|
||||||
@ -288,9 +289,9 @@ struct TileLayer
|
|||||||
* The color of the tile, or if the tile does not own
|
* The color of the tile, or if the tile does not own
|
||||||
* a color then the color of the node owning this tile.
|
* 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;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
Loading…
Reference in New Issue
Block a user