diff options
author | Daroc Alden <setupminimal@users.noreply.github.com> | 2022-03-11 15:22:49 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-11 21:22:49 +0100 |
commit | 11f3f72f1cfe8111574ee865829c380cd7fc7c30 (patch) | |
tree | 4d20e7c48b14444dc71ff326a33b5f7a8108b134 /src/client/tile.h | |
parent | ad7c72c1648a710c2d091993c9249bd3d2b607a5 (diff) | |
download | minetest-11f3f72f1cfe8111574ee865829c380cd7fc7c30.tar.gz minetest-11f3f72f1cfe8111574ee865829c380cd7fc7c30.tar.bz2 minetest-11f3f72f1cfe8111574ee865829c380cd7fc7c30.zip |
Fix undefined behavior in TileLayer (#12125)
Initialize the values properly
Diffstat (limited to 'src/client/tile.h')
-rw-r--r-- | src/client/tile.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/tile.h b/src/client/tile.h index fcdc46460..fe96cef58 100644 --- a/src/client/tile.h +++ b/src/client/tile.h @@ -195,6 +195,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; } @@ -288,9 +289,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; }; /*! |