From 656db6c6687d7df84b6c8a11aeaebadf4775b955 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Tue, 10 Mar 2020 22:37:11 +0300 Subject: [PATCH] Fatal errors: concatenate multiple args after --error It should fix error dialogs on Windows since it decomposes the arg string. --- rpcs3/main.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/rpcs3/main.cpp b/rpcs3/main.cpp index 1adb381725..5db3d7f7bc 100644 --- a/rpcs3/main.cpp +++ b/rpcs3/main.cpp @@ -271,7 +271,16 @@ int main(int argc, char** argv) // Only run RPCS3 to display an error if (int err_pos = find_arg(arg_error, argc, argv)) { - report_fatal_error(argv[err_pos + 1]); + // Reconstruction of the error from multiple args + std::string error; + for (int i = err_pos + 1; i < argc; i++) + { + if (i > err_pos + 1) + error += ' '; + error += argv[i]; + } + + report_fatal_error(error); } const std::string lock_name = fs::get_cache_dir() + "RPCS3.buf";