Skip to content

Commit

Permalink
allow envp missing
Browse files Browse the repository at this point in the history
  • Loading branch information
john30 committed Oct 3, 2023
1 parent 28bebfa commit 37334c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ebusd/main_args.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ int parse_main_args(int argc, char* argv[], char* envp[], options_t *opt, int *a

char envname[32] = "--"; // needs to cover at least max length of any option name plus "--"
char* envopt = envname+2;
for (char ** env = envp; *env; env++) {
for (char ** env = envp; env && *env; env++) {
char* pos = strchr(*env, '=');
if (!pos || strncmp(*env, "EBUSD_", sizeof("EBUSD_")-1) != 0) {
continue;
Expand Down

0 comments on commit 37334c5

Please sign in to comment.