]> git.sesse.net Git - vlc/commitdiff
Temporarily work around crashing on Windows due to %zu
authorPierre Ynard <linkfanel@yahoo.fr>
Mon, 17 Nov 2008 11:08:28 +0000 (12:08 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 17 Nov 2008 15:44:38 +0000 (16:44 +0100)
The printf functions on Windows don't support the z length modifier,
which can shift field arguments, and causes an unconditional crash in
modules.c on start-up. For now, strip it on Windows and have vlc work
again, until a better solution is found and applied.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
src/modules/modules.c

index 75656b93716dc999b3920abf949f94e3fea27b7b..0b00d07ee4ad8245c89c926c73589e18ba743bf0 100644 (file)
@@ -544,8 +544,14 @@ found_shortcut:
 
     /* Sort candidates by descending score */
     qsort (p_list, count, sizeof (p_list[0]), modulecmp);
+#ifdef WIN32
+    /* FIXME: Remove this hack after finding a general solution for %z's */
+    msg_Dbg( p_this, "looking for %s module: %u candidate%s", psz_capability,
+             count, count == 1 ? "" : "s" );
+#else
     msg_Dbg( p_this, "looking for %s module: %zu candidate%s", psz_capability,
              count, count == 1 ? "" : "s" );
+#endif
 
     /* Parse the linked list and use the first successful module */
     p_module = NULL;