]> git.wh0rd.org Git - fontconfig.git/commitdiff
[win32] Fix usage of GetFullPathName()
authorBehdad Esfahbod <behdad@behdad.org>
Wed, 4 Feb 2009 01:31:30 +0000 (20:31 -0500)
committerBehdad Esfahbod <behdad@behdad.org>
Sun, 15 Feb 2009 21:40:24 +0000 (13:40 -0800)
Diego Santa Cruz pointed out that we are using that API wrongly.
The forth argument is a pointer to a pointer.  Turns out we don't
need that arugment and it accepts NULL, so just pass that.

src/fcstr.c

index 1d946923043bf28ee24cb06d7afd74173323380e..dc7807d2efe199d0e123545958f7a0f6a13f88d1 100644 (file)
@@ -968,10 +968,8 @@ FcStrCanonFilename (const FcChar8 *s)
 {
 #ifdef _WIN32
     FcChar8 full[FC_MAX_FILE_LEN + 2];
-    FcChar8 basename[FC_MAX_FILE_LEN + 2];
     int size = GetFullPathName (s, sizeof (full) -1,
-                               full,
-                               basename);
+                               full, NULL);
 
     if (size == 0)
        perror ("GetFullPathName");