set argv[0] even if we do not pass anything else to the script
このコミットが含まれているのは:
コミット
68c67aa5e8
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014-2016 <adhocify@quitesimple.org>
|
* Copyright (c) 2014-2017 Albert S. <adhocify@quitesimple.org>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
@ -587,7 +587,8 @@ void parse_options(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
prog = argv[optind++];
|
prog = argv[optind++];
|
||||||
if(optind < argc)
|
|
||||||
|
if(optind <= argc)
|
||||||
{
|
{
|
||||||
fill_script_arguments(argc - optind, &argv[optind]);
|
fill_script_arguments(argc - optind, &argv[optind]);
|
||||||
}
|
}
|
||||||
|
読み込み中…
新しいイシューから参照
ユーザーをブロックする