[vlc-devel] [PATCH] Temporarily work around crashing on Windows due to %zu
Pierre Ynard
linkfanel at yahoo.fr
Mon Nov 17 12:08:28 CET 2008
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.
diff --git a/src/modules/modules.c b/src/modules/modules.c
index 75656b9..0b00d07 100644
--- a/src/modules/modules.c
+++ b/src/modules/modules.c
@@ -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;
Regards,
--
Pierre Ynard
"Une âme dans un corps, c'est comme un dessin sur une feuille de papier."
More information about the vlc-devel
mailing list