From 14a992bb89b10193aaa3343f598560e9cdda2257 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Sat, 17 Oct 2020 20:39:34 +0200 Subject: [PATCH] ltlsmin: fix incorrect check for dlsym error Fix #435 reported by Yann Thierry-Mieg. * spot/ltsmin/spins_interface.cc (sym): Fix incorrect check introduced by dc4a477172. --- spot/ltsmin/spins_interface.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spot/ltsmin/spins_interface.cc b/spot/ltsmin/spins_interface.cc index e5df79399..bd968b208 100644 --- a/spot/ltsmin/spins_interface.cc +++ b/spot/ltsmin/spins_interface.cc @@ -1,6 +1,6 @@ // -*- coding: utf-8 -*- -// Copyright (C) 2019 Laboratoire de Recherche et Développement de -// l'Epita (LRDE) +// Copyright (C) 2019, 2020 Laboratoire de Recherche et Développement +// de l'Epita (LRDE) // // This file is part of Spot, a model checking library. // @@ -133,7 +133,7 @@ namespace spot // should not be converted to pointer-to-functions (we have to // assume they can for POSIX). *reinterpret_cast(dst) = lt_dlsym(h, name); - if (dst == nullptr) + if (*dst == nullptr) throw std::runtime_error("Failed to resolve symbol '"s + name + "' in '" + file + "'."); };