1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-22 17:18:39 +00:00

Fix /emergeblocks crashing in debug builds (#11461)

The reason for the bug was an u16 overflow, thus failing the assert. This only happened in Debug build but not in Release builds.
This commit is contained in:
Wuzzy 2021-07-31 17:54:40 +00:00 committed by GitHub
parent 0257e7150f
commit e7cd4cfa25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 29 additions and 24 deletions

View file

@ -186,6 +186,7 @@ public:
bool getFlag(const std::string &name) const;
bool getU16NoEx(const std::string &name, u16 &val) const;
bool getS16NoEx(const std::string &name, s16 &val) const;
bool getU32NoEx(const std::string &name, u32 &val) const;
bool getS32NoEx(const std::string &name, s32 &val) const;
bool getU64NoEx(const std::string &name, u64 &val) const;
bool getFloatNoEx(const std::string &name, float &val) const;