- LWS: fix bugs pointed out by clang leading to path strings being incorrectly build.

pull/27/head
Alexander Gessler 2013-04-08 19:36:24 +02:00
parent d4dcbc4a11
commit 8f2e816042
1 changed files with 5 additions and 4 deletions

View File

@ -464,7 +464,7 @@ std::string LWSImporter::FindLWOFile(const std::string& in)
std::string tmp;
if (in.length() > 3 && in[1] == ':'&& in[2] != '\\' && in[2] != '/')
{
tmp = in[0] + ":\\" + in.substr(2);
tmp = in[0] + (":\\" + in.substr(2));
}
else tmp = in;
@ -480,11 +480,12 @@ std::string LWSImporter::FindLWOFile(const std::string& in)
// <folder>\Scenes\<hh>\<*>.lws
// where <hh> is optional.
std::string test = ".." + io->getOsSeparator() + tmp;
if (io->Exists(test))
std::string test = ".." + (io->getOsSeparator() + tmp);
if (io->Exists(test)) {
return test;
}
test = ".." + io->getOsSeparator() + test;
test = ".." + (io->getOsSeparator() + test);
if (io->Exists(test)) {
return test;
}