Commit cc1191cd authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

ltlcross: fix --verbose --no-check crash

Report from František Blahoudek.

* bin/ltlcross.cc: Do not display stats for automata
that do not exist.
* tests/core/ltlcross3.test: Test it.
* NEWS: Mention the fix.
parent ad502eb3
......@@ -32,6 +32,8 @@ New in spot 2.1.1.dev (not yet released)
* Fix python errors on Darwin when using methods from the spot module
inside of the spot.ltsmin submodule.
* Fix ltlcross crash when combining --no-check with --verbose.
New in spot 2.1.1 (2016-09-20)
Command-line tools:
......
......@@ -1066,6 +1066,8 @@ namespace
auto tmp = [&](std::vector<spot::twa_graph_ptr>& x, unsigned i,
const char prefix)
{
if (!x[i])
return;
std::cerr << "info: " << prefix << i << "\t(";
printsize(x[i]);
std::cerr << ')';
......@@ -1094,7 +1096,7 @@ namespace
std::vector<spot::twa_graph_ptr>& to, unsigned i,
char prefix)
{
if (!to[i])
if (from[i] && !to[i])
{
if (print_first)
{
......
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2012, 2013, 2014, 2015 Laboratoire de Recherche et
# Développement de l'Epita (LRDE).
# Copyright (C) 2012, 2013, 2014, 2015, 2016 Laboratoire de Recherche
# et Développement de l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
#
......@@ -180,3 +180,7 @@ cat >expected<<EOF
%
EOF
diff foo expected
# This command used to crash. Report from František Blahoudek.
run 0 ltlcross --verbose --no-checks -f 'FGa' 'ltl2tgba'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment