Permalink
Browse files

Merge pull request #144 from gagern/tt2107-dynext-get_path

[TT#2107] Fix dynloading of libraries from exact file name.
  • Loading branch information...
2 parents 7db4473 + ff9ad45 commit 2d6e52a64f865819d73ed59e37496c0b20d39457 Jimmy Zhuo committed Aug 2, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/dynext.c
View
@@ -346,7 +346,7 @@ get_path(PARROT_INTERP, ARGIN_NULLOK(STRING *lib), Parrot_dlopen_flags flags,
/* And on cygwin replace a leading "lib" by "cyg". */
#ifdef __CYGWIN__
- if (!STRING_length(lib) >= 3 && memcmp(lib->strstart, "lib", 3) == 0) {
+ if (STRING_length(lib) >= 3 && memcmp(lib->strstart, "lib", 3) == 0) {
path = Parrot_str_concat(interp, CONST_STRING(interp, "cyg"),
STRING_substr(interp, lib, 3, lib->strlen - 3));
@@ -357,7 +357,7 @@ get_path(PARROT_INTERP, ARGIN_NULLOK(STRING *lib), Parrot_dlopen_flags flags,
}
#endif
- if (!STRING_length(lib)) {
+ if (STRING_length(lib)) {
*handle = dlopen_string(interp, flags, lib);
if (*handle)
return lib;

0 comments on commit 2d6e52a

Please sign in to comment.