1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Fix undefined behaviors (#14365)

* Initialize member `floats` in ContentFeatures

* Do not assign big double to u32

* Do not assign negative floating point number to unsigned integer
This commit is contained in:
fuzun 2024-02-15 11:05:42 +01:00 committed by GitHub
parent 3cac17d23e
commit 6cbb9193ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 3 deletions

View file

@ -356,6 +356,8 @@ void ContentFeatures::reset()
has_on_construct = false;
has_on_destruct = false;
has_after_destruct = false;
floats = false;
/*
Actual data