validate: Give a proper argv[0] when running test files

Fixes CID 1462613

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/192>
This commit is contained in:
Thibault Saunier 2020-05-07 09:06:32 -04:00 committed by Edward Hervey
parent fdfe797d4e
commit 66972abafc

View file

@ -321,7 +321,7 @@ run_test_from_file (gchar * testfile, gboolean use_fakesinks)
argc++;
argv = g_new0 (char *, argc + 1);
argv[0] = argv[0];
argv[0] = (gchar *) "gst-validate-" GST_API_VERSION;
memcpy (&argv[1], args, sizeof (char *) * (argc));
ret = main (argc, argv);