Fix bus error on mac. Was a result of not having null termination of arg list to sw_vers calls.
This commit is contained in:
parent
5b74d031db
commit
80533948b2
@ -3385,19 +3385,24 @@ void SystemInformationImplementation::CallSwVers()
|
||||
kwsys_stl::string output;
|
||||
kwsys_stl::vector<const char*> args;
|
||||
args.clear();
|
||||
args.push_back("sw_vers");
|
||||
|
||||
args.push_back("sw_vers");
|
||||
args.push_back("-productName");
|
||||
args.push_back(0);
|
||||
output = this->RunProcess(args);
|
||||
this->OSName = output;
|
||||
args.pop_back();
|
||||
args.clear();
|
||||
|
||||
args.push_back("sw_vers");
|
||||
args.push_back("-productVersion");
|
||||
args.push_back(0);
|
||||
output = this->RunProcess(args);
|
||||
this->OSRelease = output;
|
||||
args.pop_back();
|
||||
args.clear();
|
||||
|
||||
args.push_back("sw_vers");
|
||||
args.push_back("-buildVersion");
|
||||
args.push_back(0);
|
||||
output = this->RunProcess(args);
|
||||
this->OSVersion = output;
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user