mirror of
https://github.com/anope/anope.git
synced 2026-06-29 20:46:39 +02:00
Warn about really big integer values in the config
This commit is contained in:
+10
-1
@@ -1941,7 +1941,16 @@ int ValueItem::GetInteger() const
|
||||
{
|
||||
if (v.empty() || !v.is_number_only())
|
||||
return 0;
|
||||
return convertTo<int>(v);
|
||||
try
|
||||
{
|
||||
return convertTo<int>(v);
|
||||
}
|
||||
catch (const ConvertException &)
|
||||
{
|
||||
Log() << "Unable to convert configuration value " << this->v << " to an integer. Value too large?";
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char *ValueItem::GetString() const
|
||||
|
||||
Reference in New Issue
Block a user