forked from old/legacy-imlib2
imlib2_view: Fix next/prev selection if last/first image is bad
This commit is contained in:
parent
1a6a6b6433
commit
baaddf9366
|
@ -326,9 +326,15 @@ main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
no += inc;
|
no += inc;
|
||||||
if (no >= argc)
|
if (no >= argc)
|
||||||
no = argc - 1;
|
{
|
||||||
else if (no <= 0)
|
inc = -1;
|
||||||
no = 0;
|
continue;
|
||||||
|
}
|
||||||
|
else if (no < 0)
|
||||||
|
{
|
||||||
|
inc = 1;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
file = argv[no];
|
file = argv[no];
|
||||||
if (verbose)
|
if (verbose)
|
||||||
printf("Show %d: '%s'\n", no, file);
|
printf("Show %d: '%s'\n", no, file);
|
||||||
|
|
Loading…
Reference in New Issue