mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-29 22:55:19 +01:00
HPChange Reason: Fix push after free, and type being overwritten (#8359)
* HPChange Reason: Fix push after free, and type being overwritten Fixes #8227 and #8344
This commit is contained in:
@@ -405,6 +405,11 @@ struct PlayerHPChangeReason {
|
||||
bool from_mod = false;
|
||||
int lua_reference = -1;
|
||||
|
||||
inline bool hasLuaReference() const
|
||||
{
|
||||
return lua_reference >= 0;
|
||||
}
|
||||
|
||||
bool setTypeFromString(const std::string &typestr)
|
||||
{
|
||||
if (typestr == "set_hp")
|
||||
|
||||
Reference in New Issue
Block a user