Skip to content

Commit

Permalink
Speed up the happy path
Browse files Browse the repository at this point in the history
  • Loading branch information
staticfloat committed Apr 30, 2020
1 parent d3b0c59 commit 28cdf1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dlload.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ JL_DLLEXPORT void *jl_load_dynamic_library(const char *modname, unsigned flags,
continue;

// Is this entry supposed to be relative to the bindir?
if (strncmp(dl_path, "@executable_path", 16 < len ? 16 : len) == 0) {
if (len >= 16 && strncmp(dl_path, "@executable_path", 16) == 0) {
snprintf(relocated, PATHBUF, "%s%s", jl_options.julia_bindir, dl_path + 16);
len = len - 16 + strlen(jl_options.julia_bindir);
} else {
Expand Down

0 comments on commit 28cdf1a

Please sign in to comment.