Skip to content

Commit

Permalink
Add --library-path long option for -L
Browse files Browse the repository at this point in the history
-L is the only option without a long form.
  • Loading branch information
thaliaarchi committed Oct 29, 2024
1 parent 192e821 commit 00b2cd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ static int isoption(const char** text, char shortopt, const char* longopt, int i
return 1;
}
} else {
if (longopt != NULL && !strcmp(*text, longopt)) {
if (!strcmp(*text, longopt)) {
*text = NULL;
return 1;
}
Expand Down Expand Up @@ -403,7 +403,7 @@ int main(int argc, char* argv[]) {
options |= PROVIDE_NULL;
} else if (isoption(&text, 'f', "from-file", is_short)) {
options |= FROM_FILE;
} else if (isoption(&text, 'L', NULL, is_short)) {
} else if (isoption(&text, 'L', "library-path", is_short)) {
if (jv_get_kind(lib_search_paths) == JV_KIND_NULL)
lib_search_paths = jv_array();
if (text != NULL) { // -Lname
Expand Down

0 comments on commit 00b2cd0

Please sign in to comment.