From bfba9f4bb472fe021475713e00d83d1fbec083f0 Mon Sep 17 00:00:00 2001 From: superwhiskers Date: Thu, 25 Jul 2024 11:32:08 -0400 Subject: [PATCH] fix argument interpretation --- examples/r_LUSOL_LUSOL.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/r_LUSOL_LUSOL.cpp b/examples/r_LUSOL_LUSOL.cpp index dbfb0ba0..68126ec7 100644 --- a/examples/r_LUSOL_LUSOL.cpp +++ b/examples/r_LUSOL_LUSOL.cpp @@ -100,7 +100,7 @@ int main(int argc, char* argv[]) for (int system = 0; system < n_systems; system++) { - std::string matrix_file_path = matrix_file_prefix + argv[system + 4] + ".mtx"; + std::string matrix_file_path = matrix_file_prefix + argv[(2 * system) + 4] + ".mtx"; std::ifstream matrix_file(matrix_file_path); if (!matrix_file.is_open()) { std::cout << "Failed to open file " << matrix_file_path << "\n"; @@ -109,7 +109,7 @@ int main(int argc, char* argv[]) std::cout << "Matrix file: " << matrix_file_path << std::endl; - std::string rhs_file_path = rhs_file_prefix + argv[system + 5] + ".mtx"; + std::string rhs_file_path = rhs_file_prefix + argv[(2 * system) + 5] + ".mtx"; std::ifstream rhs_file(rhs_file_path); if (!rhs_file.is_open()) { std::cout << "Failed to open file " << rhs_file_path << "\n";