Skip to content

Commit 6a723de

Browse files
committed
Fix stdout frontend not being available
The iota view is already exclusive in respect to the end value, so since stdout was the first item it would unintentionally be skipped in the zip operation.
1 parent 5cb10be commit 6a723de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/getopts.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ bool parse(const QStringList &args) {
100100

101101
if (p.isSet(frontend_opt)) {
102102
// find frontend, even if only a prefix matches
103-
auto frontend_selection = std::views::zip(frontend_opts, std::views::iota(0UZ, frontend_opts.size() - 1)) | std::views::filter([&](const auto &i) { return std::string(std::get<0>(i)).starts_with(p.value(frontend_opt).toStdString()); });
103+
auto frontend_selection = std::views::zip(frontend_opts, std::views::iota(0UZ, frontend_opts.size())) | std::views::filter([&](const auto &i) { return std::string(std::get<0>(i)).starts_with(p.value(frontend_opt).toStdString()); });
104104
if (frontend_selection.empty()) {
105105
// match must be unique
106106
std::cerr << "frontend needs to be one of the following:" << frontends_descr << std::endl;

0 commit comments

Comments
 (0)