|
27 | 27 |
|
28 | 28 | #include "../include/SU2_SOL.hpp" |
29 | 29 |
|
30 | | -#include <cstring> |
31 | | - |
32 | 30 | using namespace std; |
33 | 31 |
|
34 | 32 | int main(int argc, char* argv[]) { |
@@ -58,11 +56,7 @@ int main(int argc, char* argv[]) { |
58 | 56 | file is specified, default.cfg is used) ---*/ |
59 | 57 |
|
60 | 58 | if (argc == 2 || argc == 3) { |
61 | | - if (strlen(argv[1]) >= MAX_STRING_SIZE) { |
62 | | - SU2_MPI::Error("Config file path too long (exceeds MAX_STRING_SIZE).", CURRENT_FUNCTION); |
63 | | - } |
64 | | - strncpy(config_file_name, argv[1], MAX_STRING_SIZE - 1); |
65 | | - config_file_name[MAX_STRING_SIZE - 1] = '\0'; |
| 59 | + strcpy(config_file_name, argv[1]); |
66 | 60 | } else { |
67 | 61 | strcpy(config_file_name, "default.cfg"); |
68 | 62 | } |
@@ -104,12 +98,7 @@ int main(int argc, char* argv[]) { |
104 | 98 | read and stored. ---*/ |
105 | 99 |
|
106 | 100 | if (driver_config->GetnConfigFiles() > 0) { |
107 | | - const auto& zone_filename = driver_config->GetConfigFilename(iZone); |
108 | | - if (zone_filename.size() >= MAX_STRING_SIZE) { |
109 | | - SU2_MPI::Error("Zone config file path too long (exceeds MAX_STRING_SIZE).", CURRENT_FUNCTION); |
110 | | - } |
111 | | - strncpy(zone_file_name, zone_filename.c_str(), MAX_STRING_SIZE - 1); |
112 | | - zone_file_name[MAX_STRING_SIZE - 1] = '\0'; |
| 101 | + strcpy(zone_file_name, driver_config->GetConfigFilename(iZone).c_str()); |
113 | 102 | config_container[iZone] = new CConfig(driver_config, zone_file_name, SU2_COMPONENT::SU2_SOL, iZone, nZone, true); |
114 | 103 | } else { |
115 | 104 | config_container[iZone] = |
|
0 commit comments