synthesis: Fix segfault when there is no output

* spot/twaalgos/synthesis.cc: here
* tests/python/synthesis.py: create a test
* tests/Makefile.am: add synthesis.py to the tests
This commit is contained in:
Florian Renkin 2021-09-13 17:46:33 +02:00
parent 306a45f239
commit ad5203e77a
3 changed files with 52 additions and 0 deletions

View file

@ -876,6 +876,8 @@ namespace spot
[](std::vector<std::string> sv, std::string msg)
{
if (sv.size() < 2)
return;
std::sort(sv.begin(), sv.end());
const unsigned svs = sv.size() - 1;
for (unsigned i = 0; i < svs; ++i)