From a5fb5784f680670550366c16904dfb497644a35a Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Fri, 28 Oct 2016 23:07:20 +0200 Subject: [PATCH] print: fix str_sere() and str_utf8_sere(), as found by PVS-Studio These were not actually printing in "SERE" mode due to a copy/paste error. PVS-Studio seems really good at finding those. For #192. * spot/tl/print.cc: Fix it. * NEWS: Mention the bug. --- NEWS | 3 +++ spot/tl/print.cc | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 8ea8c715b..72817495d 100644 --- a/NEWS +++ b/NEWS @@ -28,6 +28,9 @@ New in spot 2.1.2.dev (not yet released) * Compression could encode '6' and '22' in the same way. This issue only appears when using the compression from intvcomp.hh. + * str_sere() and str_utf8_sere() were not returning the same + string that print_sere() and print_utf8_sere() would print. + New in spot 2.1.2 (2016-10-14) Command-line tools: diff --git a/spot/tl/print.cc b/spot/tl/print.cc index 06fb49d19..f46dc4976 100644 --- a/spot/tl/print.cc +++ b/spot/tl/print.cc @@ -893,7 +893,7 @@ namespace spot std::string str_sere(formula f, bool full_parent) { - return str_(f, full_parent, false, spot_kw); + return str_(f, full_parent, true, spot_kw); } @@ -918,7 +918,7 @@ namespace spot std::string str_utf8_sere(formula f, bool full_parent) { - return str_(f, full_parent, false, utf8_kw); + return str_(f, full_parent, true, utf8_kw); }