mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-16 13:47:35 +08:00
POSIX: use up to 20 command line arguments
This fixes the case where more than 10 args were needed for instance when starting mavlink with all its options.
This commit is contained in:
@@ -252,10 +252,11 @@ static void usage()
|
||||
|
||||
static void process_line(string &line, bool exit_on_fail)
|
||||
{
|
||||
vector<string> appargs(10);
|
||||
vector<string> appargs(20);
|
||||
|
||||
stringstream(line) >> appargs[0] >> appargs[1] >> appargs[2] >> appargs[3] >> appargs[4] >> appargs[5] >> appargs[6] >>
|
||||
appargs[7] >> appargs[8] >> appargs[9];
|
||||
appargs[7] >> appargs[8] >> appargs[9] >> appargs[10] >> appargs[11] >> appargs[12] >> appargs[13] >>
|
||||
appargs[14] >> appargs[15] >> appargs[16] >> appargs[17] >> appargs[18] >> appargs[19];
|
||||
run_cmd(appargs, exit_on_fail);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user