Skip to content

Commit

Permalink
fix c char* whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
a-zakir committed Jun 7, 2024
1 parent 2bac4fb commit ce0a628
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/cpp/multisolver_interface/environment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#include <mutex>
#include <sstream>
#include <string>

#include "StringManip.h"
namespace LoadXpress {

#define STRINGIFY2(X) #X
Expand Down Expand Up @@ -244,7 +246,11 @@ std::string XpressLoader::GetXpressVarFromEnvironmentVariables(
xpress_home_from_env = path;
}
#endif
return xpress_home_from_env;
if (auto env_var_size = xpress_home_from_env.size(); env_var_size > 0) {
return xpress_home_from_env.substr(0, env_var_size - 1);
} else {
xpress_home_from_env;
}
}

std::vector<std::string> XpressLoader::XpressDynamicLibraryPotentialPaths() {
Expand Down

0 comments on commit ce0a628

Please sign in to comment.