]> granicus.if.org Git - libass/commitdiff
ass_fontselect: do not use PATH_MAX
authorwm4 <wm4@nowhere>
Sun, 13 Sep 2015 20:49:04 +0000 (22:49 +0200)
committerwm4 <wm4@nowhere>
Sun, 13 Sep 2015 20:49:04 +0000 (22:49 +0200)
This seems to cause issues on MSVC. Considering that even most Unix OSes
hate PATH_MAX and don't really honour it, using 4096 is just as good.

libass/ass_fontselect.c

index 2a2ec51bbbd204466b73bbf6d5fc4a4e292b0b33..e75eb1fce9ad3d143f08e21fcb266dd111580cce 100644 (file)
@@ -166,7 +166,7 @@ static void load_fonts_from_dir(ASS_Library *library, const char *dir)
             break;
         if (entry->d_name[0] == '.')
             continue;
-        char fullname[PATH_MAX];
+        char fullname[4096];
         snprintf(fullname, sizeof(fullname), "%s/%s", dir, entry->d_name);
         size_t bufsize = 0;
         ass_msg(library, MSGL_WARN, "Loading font file '%s'", fullname);