Core/Logging: fixed log level range check in Log::SetLogLevel
This commit is contained in:
1 parent
81c6172fb7
commit
23a608a504
1 file changed
+4
-2
@@ -262,10 +262,12 @@ std::string Log::GetTimestampStr()
|
||||
|
||||
bool Log::SetLogLevel(std::string const& name, char const* newLevelc, bool isLogger /* = true */)
|
||||
{
|
||||
LogLevel newLevel = LogLevel(atoi(newLevelc));
|
||||
if (static_cast<int>(newLevel) < 0)
|
||||
int32 newLeveli = atoi(newLevelc);
|
||||
if (newLeveli < 0)
|
||||
return false;
|
||||
|
||||
LogLevel newLevel = static_cast<LogLevel>(newLeveli);
|
||||
|
||||
if (isLogger)
|
||||
{
|
||||
auto it = loggers.begin();
|
||||
|
||||
Reference in new issue
Block a user