This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
OS/2 update
[perl5.git] / ext / DynaLoader / dl_os2.xs
index 5ca213b..2c72be2 100644 (file)
@@ -27,6 +27,8 @@ dlopen(char *path, int mode)
        if ((rc = DosLoadModule(fail, sizeof fail, path, &handle)) == 0)
                return (void *)handle;
 
+       retcode = rc;
+
        /* Not found. Check for non-FAT name and try truncated name. */
        /* Don't know if this helps though... */
        for (beg = dot = path + strlen(path);
@@ -42,7 +44,6 @@ dlopen(char *path, int mode)
                        return (void *)handle;
        }
 
-       retcode = rc;
        return NULL;
 }