mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-02 01:40:13 -05:00
Merge branch 'argc-is-zero'
This commit is contained in:
commit
99ebff5a51
3 changed files with 11 additions and 6 deletions
|
|
@ -79,6 +79,7 @@
|
||||||
characters (e.g. emojis).
|
characters (e.g. emojis).
|
||||||
* Rendering of CSD borders when `csd.border-width > 0` and desktop
|
* Rendering of CSD borders when `csd.border-width > 0` and desktop
|
||||||
scaling has been enabled.
|
scaling has been enabled.
|
||||||
|
* Failure to launch when `exec(3)’:ed with an empty argv.
|
||||||
|
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
|
||||||
8
client.c
8
client.c
|
|
@ -124,7 +124,7 @@ main(int argc, char *const *argv)
|
||||||
static const int foot_exit_failure = -36;
|
static const int foot_exit_failure = -36;
|
||||||
int ret = foot_exit_failure;
|
int ret = foot_exit_failure;
|
||||||
|
|
||||||
const char *const prog_name = argv[0];
|
const char *const prog_name = argc > 0 ? argv[0] : "<nullptr>";
|
||||||
|
|
||||||
static const struct option longopts[] = {
|
static const struct option longopts[] = {
|
||||||
{"term", required_argument, NULL, 't'},
|
{"term", required_argument, NULL, 't'},
|
||||||
|
|
@ -309,8 +309,10 @@ main(int argc, char *const *argv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
argc -= optind;
|
if (argc > 0) {
|
||||||
argv += optind;
|
argc -= optind;
|
||||||
|
argv += optind;
|
||||||
|
}
|
||||||
|
|
||||||
log_init(log_colorize, false, LOG_FACILITY_USER, log_level);
|
log_init(log_colorize, false, LOG_FACILITY_USER, log_level);
|
||||||
|
|
||||||
|
|
|
||||||
8
main.c
8
main.c
|
|
@ -168,7 +168,7 @@ main(int argc, char *const *argv)
|
||||||
* don't pass this on to programs launched by us */
|
* don't pass this on to programs launched by us */
|
||||||
unsetenv("DESKTOP_STARTUP_ID");
|
unsetenv("DESKTOP_STARTUP_ID");
|
||||||
|
|
||||||
const char *const prog_name = argv[0];
|
const char *const prog_name = argc > 0 ? argv[0] : "<nullptr>";
|
||||||
|
|
||||||
static const struct option longopts[] = {
|
static const struct option longopts[] = {
|
||||||
{"config", required_argument, NULL, 'c'},
|
{"config", required_argument, NULL, 'c'},
|
||||||
|
|
@ -401,8 +401,10 @@ main(int argc, char *const *argv)
|
||||||
as_server && log_syslog,
|
as_server && log_syslog,
|
||||||
(enum fcft_log_class)log_level);
|
(enum fcft_log_class)log_level);
|
||||||
|
|
||||||
argc -= optind;
|
if (argc > 0) {
|
||||||
argv += optind;
|
argc -= optind;
|
||||||
|
argv += optind;
|
||||||
|
}
|
||||||
|
|
||||||
LOG_INFO("%s", version_and_features());
|
LOG_INFO("%s", version_and_features());
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue