diff options
author | Johannes Schickel | 2014-06-05 16:31:04 +0200 |
---|---|---|
committer | Johannes Schickel | 2014-06-05 16:32:27 +0200 |
commit | 559c10e91af05b846355156a439ce873d8e241e3 (patch) | |
tree | d884a709d3d6c9551d20fbb623e0d0ca9ab1d11e | |
parent | 450924a0c72bfdcdee627e2da4782853b94bd866 (diff) | |
download | scummvm-rg350-559c10e91af05b846355156a439ce873d8e241e3.tar.gz scummvm-rg350-559c10e91af05b846355156a439ce873d8e241e3.tar.bz2 scummvm-rg350-559c10e91af05b846355156a439ce873d8e241e3.zip |
COMMON: Don't allow debug channel 'all' to be used.
-rw-r--r-- | common/debug.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/common/debug.cpp b/common/debug.cpp index b8c345e4f0..182b28afdf 100644 --- a/common/debug.cpp +++ b/common/debug.cpp @@ -46,6 +46,11 @@ struct DebugLevelComperator { } // end of anonymous namespace bool DebugManager::addDebugChannel(uint32 channel, const String &name, const String &description) { + if (name.equalsIgnoreCase("all")) { + warning("Debug channel 'all' is reserved for internal use"); + return false; + } + if (gDebugChannels.contains(name)) warning("Duplicate declaration of engine debug channel '%s'", name.c_str()); |