some small include fixes, some checks for NULL ptrs,
loader/elf.c: fixed the "lib" insertion
crtdll: added fsopen()
dinput: return that we are attached.
diff --git a/loader/elf.c b/loader/elf.c
index d4ba4e9..d4f9af6 100644
--- a/loader/elf.c
+++ b/loader/elf.c
@@ -114,8 +114,10 @@
if (!s)
s=strrchr(libname,'\\');
if (s) {
- strncpy(t,libname,s-libname+1);
- t[s-libname+1]= '\0';
+ s++; /* skip / or \ */
+ /* copy everything up to s-1 */
+ memcpy(t,libname,s-libname);
+ t[s-libname]= '\0';
} else
s = (LPSTR)libname;
modname = s;