1
0
mirror of https://github.com/anope/anope.git synced 2026-06-27 20:26:38 +02:00

Convert Anope::Debug to an unsigned value.

This commit is contained in:
Sadie Powell
2025-05-24 16:51:33 +01:00
parent e182519e4d
commit 23e72fc934
5 changed files with 10 additions and 11 deletions
+3 -4
View File
@@ -390,11 +390,10 @@ bool Anope::Init(int ac, char **av)
{
if (!arg.empty())
{
auto level = Anope::Convert<int>(arg, -1);
if (level > 0)
Anope::Debug = level;
else
auto level = Anope::TryConvert<unsigned>(arg);
if (!level.has_value())
throw CoreException("Invalid option given to --debug");
Anope::Debug = level.value();
}
else
++Anope::Debug;