Skip to content

Commit d10bdd4

Browse files
committed
reading input as last argument instead of first
1 parent 9bb6c7d commit d10bdd4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/nsc/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ class ShaderCompiler final : public system::IApplicationFramework
3636
return false;
3737
}
3838

39-
m_arguments = std::vector<std::string>(argv.begin() + 2, argv.end()); // turn argv into vector for convenience
40-
std::string file_to_compile = argv[1];
39+
m_arguments = std::vector<std::string>(argv.begin() + 1, argv.end()-1); // turn argv into vector for convenience
40+
std::string file_to_compile = argv.back();
4141

4242
if (!m_system->exists(file_to_compile, IFileBase::ECF_READ)) {
4343
m_logger->log("Incorrect arguments. Expecting second argument to be filename of the shader intended to compile.", ILogger::ELL_ERROR);

0 commit comments

Comments
 (0)