diff --git a/src/luaplayer.cpp b/src/luaplayer.cpp index 10b24f7..58b4784 100644 --- a/src/luaplayer.cpp +++ b/src/luaplayer.cpp @@ -2178,7 +2178,7 @@ int luaPlayerGetExperienceRate(lua_State* L) } auto type = getInteger(L, 2); - if (type < 0 || type > static_cast(ExperienceRateType::STAMINA)) { + if (type > static_cast(ExperienceRateType::STAMINA)) { lua_pushnil(L); return 1; } @@ -2197,7 +2197,7 @@ int luaPlayerSetExperienceRate(lua_State* L) } auto type = getInteger(L, 2); - if (type < 0 || type > static_cast(ExperienceRateType::STAMINA)) { + if (type > static_cast(ExperienceRateType::STAMINA)) { lua_pushnil(L); return 1; }