diff options
author | Bert <ber.t@gmx.com> | 2011-05-25 09:23:23 +0200 |
---|---|---|
committer | Bert <ber.t@gmx.com> | 2011-05-25 09:23:23 +0200 |
commit | 2252a0148d11fc988131eb0bf6397453427d67e8 (patch) | |
tree | 7cb4e226e2405b420876709e033a8bcdffa8777c /main.c | |
parent | 00e6cd2bd1a7bfc0b9fcbf958cefee07ef41cb71 (diff) | |
download | nsxiv-2252a0148d11fc988131eb0bf6397453427d67e8.tar.zst |
New option: -n, start at given picture
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -231,14 +231,14 @@ int main(int argc, char **argv) { } } - filecnt = fileidx; - fileidx = 0; - - if (!filecnt) { + if (!fileidx) { fprintf(stderr, "sxiv: no valid image file given, aborting\n"); exit(1); } + filecnt = fileidx; + fileidx = options->startnum < filecnt ? options->startnum : filecnt - 1; + win_init(&win); img_init(&img, &win); |