mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +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:
parent
0257e7150f
commit
e7cd4cfa25
5 changed files with 29 additions and 24 deletions
|
@ -755,6 +755,15 @@ bool Settings::getS16NoEx(const std::string &name, s16 &val) const
|
|||
}
|
||||
}
|
||||
|
||||
bool Settings::getU32NoEx(const std::string &name, u32 &val) const
|
||||
{
|
||||
try {
|
||||
val = getU32(name);
|
||||
return true;
|
||||
} catch (SettingNotFoundException &e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool Settings::getS32NoEx(const std::string &name, s32 &val) const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue