Skip to content

Commit

Permalink
main: handle the case when $HOME is empty
Browse files Browse the repository at this point in the history
Suggested by @itchyny in universal-ctags#2384.

When $HOME is set but it is an empty string,
  • Loading branch information
masatake committed Dec 23, 2019
1 parent 0a813e5 commit fc533cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -3522,7 +3522,7 @@ static char* prependEnvvar (const char *path, const char* envvar)
char *full_path = NULL;

const char* const envval = getenv (envvar);
if (envval)
if (envval && strlen (envval))
full_path = combinePathAndFile(envval, path);

return full_path;
Expand Down

0 comments on commit fc533cd

Please sign in to comment.