Skip to content

Commit

Permalink
fix experiencerate type comparation
Browse files Browse the repository at this point in the history
  • Loading branch information
MillhioreBT committed Apr 28, 2024
1 parent 3fe2043 commit 738dcc1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/luaplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2178,7 +2178,7 @@ int luaPlayerGetExperienceRate(lua_State* L)
}

auto type = getInteger<uint8_t>(L, 2);
if (type < 0 || type > static_cast<uint8_t>(ExperienceRateType::STAMINA)) {
if (type > static_cast<uint8_t>(ExperienceRateType::STAMINA)) {
lua_pushnil(L);
return 1;
}
Expand All @@ -2197,7 +2197,7 @@ int luaPlayerSetExperienceRate(lua_State* L)
}

auto type = getInteger<uint8_t>(L, 2);
if (type < 0 || type > static_cast<uint8_t>(ExperienceRateType::STAMINA)) {
if (type > static_cast<uint8_t>(ExperienceRateType::STAMINA)) {
lua_pushnil(L);
return 1;
}
Expand Down

0 comments on commit 738dcc1

Please sign in to comment.