bin: fix handling for --output & --format with LTL outputs

* bin/common_output.cc: Set the output stream for LTL formats.
This commit is contained in:
Alexandre Duret-Lutz 2023-07-26 21:33:36 +02:00
parent 8065759fbd
commit 69b9ffef9a
2 changed files with 5 additions and 1 deletions

3
NEWS
View file

@ -8,6 +8,9 @@ New in spot 2.11.5.dev (not yet released)
where thousands of different filenames can be created failed with
"Too many open files". (Issue #534)
- Using --format=... on a tool that output formulas would force
the output on standard output, even when --output was given.
New in spot 2.11.5 (2023-04-20)

View file

@ -224,7 +224,7 @@ namespace
}
};
class formula_printer final: protected spot::formater
class formula_printer final: public spot::formater
{
public:
formula_printer(std::ostream& os, const char* format)
@ -392,6 +392,7 @@ output_formula(std::ostream& out,
else
{
formula_with_location fl = { f, filename, linenum, prefix, suffix };
format->set_output(out);
format->print(fl, ptimer);
}
}