diff --git a/.gitignore b/.gitignore index 27d3a13de..b757c53f1 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,6 @@ CMakeLists.txt.user *.swp *.swo *.kate-swp +.cproject +.project +.settings/ diff --git a/apps/openmw/mwscript/scriptmanagerimp.cpp b/apps/openmw/mwscript/scriptmanagerimp.cpp index b3e5f8ff6..14fe5b7fd 100644 --- a/apps/openmw/mwscript/scriptmanagerimp.cpp +++ b/apps/openmw/mwscript/scriptmanagerimp.cpp @@ -209,6 +209,7 @@ namespace MWScript offset = script->mData.mNumShorts+script->mData.mNumLongs; size = script->mData.mNumFloats; + break; default: diff --git a/components/compiler/scanner.cpp b/components/compiler/scanner.cpp index 38e0c353d..b45015d1e 100644 --- a/components/compiler/scanner.cpp +++ b/components/compiler/scanner.cpp @@ -1,6 +1,7 @@ #include "scanner.hpp" +#include #include #include #include @@ -163,10 +164,9 @@ namespace Compiler bool Scanner::scanInt (char c, Parser& parser, bool& cont) { + assert(c != '\0'); std::string value; - value += c; - bool empty = false; bool error = false; @@ -175,7 +175,6 @@ namespace Compiler if (std::isdigit (c)) { value += c; - empty = false; } else if (std::isalpha (c) || c=='_') error = true; @@ -190,7 +189,7 @@ namespace Compiler } } - if (empty || error) + if (error) return false; TokenLoc loc (mLoc);