Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Commit

Permalink
Fixed overflow after premium expires (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
EPuncker committed Apr 1, 2022
1 parent e71f8c0 commit 7761580
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/protocollogin.cpp
Expand Up @@ -78,7 +78,7 @@ void ProtocolLogin::getCharacterList(const std::string& accountName, const std::
if (g_config.getBoolean(ConfigManager::FREE_PREMIUM)) {
output->add<uint16_t>(0xFFFF); //client displays free premium
} else {
output->add<uint16_t>((account.premiumEndsAt - time(nullptr)) / 86400);
output->add<uint16_t>(std::max<time_t>(0, account.premiumEndsAt - time(nullptr)) / 86400);
}

send(output);
Expand Down

0 comments on commit 7761580

Please sign in to comment.