diff options
author | Linux User <ncopa@alpine-netbook.(none)> | 2009-05-21 20:24:07 +0000 |
---|---|---|
committer | Linux User <ncopa@alpine-netbook.(none)> | 2009-05-21 20:24:07 +0000 |
commit | 651aa71ac2dfc6d3c78e106cacb8fa699095f845 (patch) | |
tree | 526ccf7ce042f6c5d2cb216dccda29f5e777be6e | |
parent | 0906a1c7de37ba54f29e9dbabbbd5ea069258cef (diff) | |
download | apk-tools-651aa71ac2dfc6d3c78e106cacb8fa699095f845.tar.gz apk-tools-651aa71ac2dfc6d3c78e106cacb8fa699095f845.tar.bz2 apk-tools-651aa71ac2dfc6d3c78e106cacb8fa699095f845.tar.xz apk-tools-651aa71ac2dfc6d3c78e106cacb8fa699095f845.zip |
add: fix segfault when no params are given
-rw-r--r-- | src/add.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); |