diff options
| author | auth12 <[email protected]> | 2021-07-08 14:08:26 +0100 |
|---|---|---|
| committer | auth12 <[email protected]> | 2021-07-08 14:08:26 +0100 |
| commit | 65815cf0f712645472c51fffdb9c34858a278bfe (patch) | |
| tree | de947fd7fc1c38ff4ab903df695cf5a10f7a95c2 /sysmap/src/main.cpp | |
| parent | Replaced create thread with thread hijacking (diff) | |
| download | archived-sysmap-main.tar.xz archived-sysmap-main.zip | |
Diffstat (limited to 'sysmap/src/main.cpp')
| -rw-r--r-- | sysmap/src/main.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/sysmap/src/main.cpp b/sysmap/src/main.cpp index d775e6c..690b6b0 100644 --- a/sysmap/src/main.cpp +++ b/sysmap/src/main.cpp @@ -18,26 +18,23 @@ apiset_t g_apiset; int main(int argc, char* argv[]) { std::vector<std::string> args; + spdlog::set_pattern("[%^+%$] %v"); + for (int i = 1; i < argc; ++i) { args.emplace_back(argv[i]); } if (args.size() < 2) { io::log<critical>("Invalid arguments specified."); - std::cin.get(); - return 0; } for (auto& arg : args) { - if (arg == "--debug") { + if (arg == "-v") { spdlog::set_level(spdlog::level::debug); } } - spdlog::set_pattern("[%^%l%$] %v"); - spdlog::set_level(spdlog::level::debug); - g_ctx.local_modules = std::move(util::get_modules()); auto ntdll = g_ctx.local_modules[1]; @@ -51,8 +48,6 @@ int main(int argc, char* argv[]) { auto buf = io::read_file(args[1]); if (buf.empty()) { io::log<critical>("failed to read file."); - std::cin.get(); - return 0; } @@ -68,5 +63,6 @@ int main(int argc, char* argv[]) { } std::cin.get(); - return 0; + + return 1; }
\ No newline at end of file |