diff --git a/etc/nsxiv.1 b/etc/nsxiv.1 index 999f91b..2c3c910 100644 --- a/etc/nsxiv.1 +++ b/etc/nsxiv.1 @@ -37,6 +37,9 @@ manager. .BI "\-A, \-\-framerate " FRAMERATE Play animations with a constant frame rate set to .IR FRAMERATE . +If +.I FRAMERATE +is set to 0 then animation playback is disabled. .TP .B "\-a, \-\-animate" Play animations of multi-frame images. diff --git a/options.c b/options.c index b9a244c..af54103 100644 --- a/options.c +++ b/options.c @@ -171,10 +171,11 @@ void parse_options(int argc, char **argv) exit(EXIT_FAILURE); case 'A': n = strtol(op.optarg, &end, 0); - if (*end != '\0' || n <= 0 || n > INT_MAX) + if (*end != '\0' || n < 0 || n > INT_MAX) error(EXIT_FAILURE, 0, "Invalid framerate: %s", op.optarg); _options.framerate = n; - /* fall through */ + _options.animate = n > 0; + break; case 'a': _options.animate = true; break;