diff options
author | David Robillard <d@drobilla.net> | 2011-05-24 14:23:24 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-05-24 14:23:24 +0000 |
commit | 2dff746982463158fdf7c3a4a47fee92b1d61551 (patch) | |
tree | 857c54db32dfbcf6cc72512384375ac52e30f8ce /src/serdi.c | |
parent | 0b546799dc0af6d6d97e2a514c92d261138b73fb (diff) | |
download | serd-2dff746982463158fdf7c3a4a47fee92b1d61551.tar.gz serd-2dff746982463158fdf7c3a4a47fee92b1d61551.tar.bz2 serd-2dff746982463158fdf7c3a4a47fee92b1d61551.zip |
Fix crash when input is not given.
CURIEify by default.
git-svn-id: http://svn.drobilla.net/serd/trunk@190 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src/serdi.c')
-rw-r--r-- | src/serdi.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/serdi.c b/src/serdi.c index 833e92d2..c3f7aa2e 100644 --- a/src/serdi.c +++ b/src/serdi.c @@ -138,6 +138,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; @@ -191,7 +196,7 @@ main(int argc, char** argv) if (output_syntax == SERD_NTRIPLES) { output_style |= SERD_STYLE_ASCII; } else { - output_style |= SERD_STYLE_ABBREVIATED; + output_style |= SERD_STYLE_ABBREVIATED|SERD_STYLE_CURIED; } SerdWriter* writer = serd_writer_new( |