From 8f2e8160424e086c59d0dd4b693b4b529e650d46 Mon Sep 17 00:00:00 2001 From: Alexander Gessler Date: Mon, 8 Apr 2013 19:36:24 +0200 Subject: [PATCH] - LWS: fix bugs pointed out by clang leading to path strings being incorrectly build. --- code/LWSLoader.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/code/LWSLoader.cpp b/code/LWSLoader.cpp index cfd72766b..0ff3f9e10 100644 --- a/code/LWSLoader.cpp +++ b/code/LWSLoader.cpp @@ -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) // \Scenes\\<*>.lws // where 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; }