aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMax Horn2008-09-27 18:34:24 +0000
committerMax Horn2008-09-27 18:34:24 +0000
commit0d34b772a408771b742cd196b14b6cbb34145d00 (patch)
tree42bc1e0b13841e49f937d61785f56217ad1bebc6 /common
parent479e67f2f27f49ae7665cd552acfb55e6192f1ae (diff)
downloadscummvm-rg350-0d34b772a408771b742cd196b14b6cbb34145d00.tar.gz
scummvm-rg350-0d34b772a408771b742cd196b14b6cbb34145d00.tar.bz2
scummvm-rg350-0d34b772a408771b742cd196b14b6cbb34145d00.zip
Fixed a nasty bug in SearchManager::addDirectory; made the 'char' constructor of Common::String explicit, to avoid such bugs in the future
svn-id: r34660
Diffstat (limited to 'common')
-rw-r--r--common/archive.cpp2
-rw-r--r--common/str.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/common/archive.cpp b/common/archive.cpp
index bae316d5e5..ee27b216d1 100644
--- a/common/archive.cpp
+++ b/common/archive.cpp
@@ -338,7 +338,7 @@ void SearchManager::addArchive(const String &name, ArchivePtr archive) {
}
void SearchManager::addDirectory(const String &name, const String &directory) {
- addDirectoryRecursive(name, 1);
+ addDirectoryRecursive(name, directory, 1);
}
void SearchManager::addDirectoryRecursive(const String &name, const String &directory, int depth) {
diff --git a/common/str.h b/common/str.h
index 772718a087..c3e773c3e4 100644
--- a/common/str.h
+++ b/common/str.h
@@ -112,7 +112,7 @@ public:
String(const String &str);
/** Construct a string consisting of the given character. */
- String(char c);
+ explicit String(char c);
~String();