summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-05-24 14:27:51 +0000
committerDavid Robillard <d@drobilla.net>2011-05-24 14:27:51 +0000
commit7cc5b47ea01165b77abc78488d61e76c8e129888 (patch)
tree7976425935409041bf78e2a076dd6365efdf28ff
parent4c9c6ddc710898c38fe37f09cc6087aed0cadc78 (diff)
downloadsord-7cc5b47ea01165b77abc78488d61e76c8e129888.tar.gz
sord-7cc5b47ea01165b77abc78488d61e76c8e129888.tar.bz2
sord-7cc5b47ea01165b77abc78488d61e76c8e129888.zip
Fix crash when input is missing
git-svn-id: http://svn.drobilla.net/sord/trunk@127 3d64ff67-21c5-427c-a301-fe4f08042e5a
-rw-r--r--src/sordi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sordi.c b/src/sordi.c
index 8843162..7681878 100644
--- a/src/sordi.c
+++ b/src/sordi.c
@@ -125,6 +125,11 @@ main(int argc, char** argv)
}
}
+ if (a == argc) {
+ fprintf(stderr, "Missing input\n");
+ return 1;
+ }
+
const uint8_t* input = (const uint8_t*)argv[a++];
if (from_file) {
in_name = in_name ? in_name : input;