]> git.xonotic.org Git - xonotic/netradiant.git/commitdiff
fix two more bugs
authorRudolf Polzer <divverent@alientrap.org>
Wed, 20 Apr 2011 15:50:29 +0000 (17:50 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Wed, 20 Apr 2011 15:50:29 +0000 (17:50 +0200)
tools/quake3/q3map2/path_init.c

index 5369c31240ce8a95ba8d25686a07ad2db64b7fc1..501317f60767d2fb592d4e98d8be61bd8f0371a3 100644 (file)
@@ -75,7 +75,7 @@ char *LokiGetHomeDir( void )
                        TCHAR mydocsdir[MAX_PATH + 1];
                        if(SHGetFolderPath(NULL, CSIDL_PERSONAL, NULL, 0, mydocsdir))
                        {
-                               snprintf(buf, "%s/My Games", mydocsdir);
+                               snprintf(buf, sizeof(buf), "%s/My Games", mydocsdir);
                                return buf;
                        }
                        return NULL;
@@ -119,6 +119,8 @@ initializes some paths on linux/os x
 void LokiInitPaths( char *argv0 )
 {
        #ifndef Q_UNIX
+               char            *home;
+
                /* this is kinda crap, but hey */
                strcpy( installPath, "../" );