mirror of
https://github.com/sam-astro/Z-Sharp.git
synced 2025-12-10 15:52:12 +00:00
Update builtin.h
This commit is contained in:
parent
0af8f5fff7
commit
eda78e8c39
@ -468,8 +468,13 @@ boost::any ZSFunction(const string& name, const vector<boost::any>& args)
|
||||
Vec2 v(AnyAsFloat(args.at(0)), AnyAsFloat(args.at(1)));
|
||||
return v;
|
||||
}
|
||||
else if (name == "ZS.System.Command")
|
||||
int temp = system(StringRaw(AnyAsString(args.at(0))));
|
||||
else if (name == "ZS.System.Command"){
|
||||
string command = StringRaw(AnyAsString(args.at(0)));
|
||||
int command_len = command.length();
|
||||
char command_char_arr[command_len + 1];
|
||||
strcpy(command_char_arr, command.c_str()); // string into char arr
|
||||
int k = system(command_char_arr);
|
||||
}
|
||||
else
|
||||
LogWarning("ZS function \'" + name + "\' does not exist.");
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user