]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sys_shared.c
PRVM: optimise string arguments
[xonotic/darkplaces.git] / sys_shared.c
index 6cfe9213cded7209365dadec923b7598a7bdf62e..f9f118bf5180e88a79d936e1a9421acc276d5bdc 100644 (file)
 #include "thread.h"
 #include "libcurl.h"
 
+#ifdef WIN32
+       // Microsoft's compiler complains about portable code
+       #pragma warning(disable : 4996)
+#endif
+
 sys_t sys;
 
 static char sys_timestring[128];
@@ -208,13 +213,13 @@ notfound:
        if (!dllhandle && strrchr(sys.argv[0], '/'))
        {
                char path[MAX_OSPATH];
-               strlcpy(path, sys.argv[0], sizeof(path));
+               dp_strlcpy(path, sys.argv[0], sizeof(path));
                strrchr(path, '/')[1] = 0;
                for (i = 0; dllnames[i] != NULL; i++)
                {
                        char temp[MAX_OSPATH];
-                       strlcpy(temp, path, sizeof(temp));
-                       strlcat(temp, dllnames[i], sizeof(temp));
+                       dp_strlcpy(temp, path, sizeof(temp));
+                       dp_strlcat(temp, dllnames[i], sizeof(temp));
                        Con_DPrintf (" \"%s\"", temp);
 
                        if(Sys_LoadLibrary(temp, &dllhandle))