summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorOneric <oneric@oneric.stub>2022-05-07 03:00:24 +0200
committerOneric <oneric@oneric.stub>2022-05-07 22:26:38 +0200
commitdf8e07544f141aae696f4dc5b4ec8f5eb2227f16 (patch)
treea3cb1817ef1e22fc3bea0a459254aadf26c4424a /test
parenta6ae1d2fb30551570bd2fee094e1eb9e5c632afe (diff)
downloadlibass-df8e07544f141aae696f4dc5b4ec8f5eb2227f16.tar.bz2
libass-df8e07544f141aae696f4dc5b4ec8f5eb2227f16.tar.xz
Avoid passing NULL to printf's %s if argc == 0
This is undefined behaviour even if most libcs handle it gracefully.
Diffstat (limited to 'test')
-rw-r--r--test/test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/test.c b/test/test.c
index f1de28f..b9754c9 100644
--- a/test/test.c
+++ b/test/test.c
@@ -199,7 +199,7 @@ int main(int argc, char *argv[])
if (argc != 4 && argc != 6) {
printf("usage: %s <image file> <subtitle file> <time> "
"[<storage width> <storage height>]\n",
- argv[0]);
+ argv[0] ? argv[0] : "test");
exit(1);
}
char *imgfile = argv[1];