From: Martin Mares Date: Fri, 13 Apr 2018 21:14:06 +0000 (+0200) Subject: Fix ranges in select command X-Git-Tag: v1.0~8 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=f71bfb43c43e07d7b7fa1bfb8b13f4d0fc2510b7;p=paperjam.git Fix ranges in select command --- diff --git a/cmds.cc b/cmds.cc index 73daa4c..9ce9e03 100644 --- a/cmds.cc +++ b/cmds.cc @@ -575,7 +575,7 @@ vector select_cmd::process(vector &pages) int f = validate_page_index(pages, ps.from); int t = validate_page_index(pages, ps.to); int step = (f <= t) ? 1 : -1; - for (int i=f; f<=t; f += step) + for (int i=f; i<=t; i += step) selected.push_back(pages[i]); } auto processed = run_command_list(pb->commands, selected);