Commit 651aa71a authored by Linux User's avatar Linux User
Browse files

add: fix segfault when no params are given

parent 0906a1c7
......@@ -60,7 +60,8 @@ static int add_main(void *ctx, int argc, char **argv)
struct apk_dependency virtdep;
int i, r;
if (strcmp(argv[0], "starwars") == 0)
if ((argc > 0) && (apk_verbosity > 1) &&
(strcmp(argv[0], "starwars") == 0))
return system("telnet towel.blinkenlights.nl");
r = apk_db_open(&db, apk_root, actx->open_flags | APK_OPENF_WRITE);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment