Skip to content

Commit

Permalink
Allow custom state to be empty in order to reset it
Browse files Browse the repository at this point in the history
This will allow servers to revert to using the built-in/default states
  • Loading branch information
Lpsd committed Oct 12, 2023
1 parent fc9a35b commit 233211b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Client/mods/deathmatch/logic/luadefs/CLuaDiscordDefs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ bool CLuaDiscordDefs::SetState(std::string strState)
{
int stateLength = strState.length();

if (stateLength < 1 || stateLength > 128)
throw std::invalid_argument("State name must be greater than 0, or less than/equal to 128");
if (stateLength > 128)
throw std::invalid_argument("State must be less than/equal to 128");

auto discord = g_pCore->GetDiscord();

Expand Down

0 comments on commit 233211b

Please sign in to comment.