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.
This commit is contained in:
parent
43bd39f13f
commit
14a992bb89
1 changed files with 3 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2019 Laboratoire de Recherche et Développement de
|
// Copyright (C) 2019, 2020 Laboratoire de Recherche et Développement
|
||||||
// l'Epita (LRDE)
|
// de l'Epita (LRDE)
|
||||||
//
|
//
|
||||||
// This file is part of Spot, a model checking library.
|
// 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
|
// should not be converted to pointer-to-functions (we have to
|
||||||
// assume they can for POSIX).
|
// assume they can for POSIX).
|
||||||
*reinterpret_cast<void**>(dst) = lt_dlsym(h, name);
|
*reinterpret_cast<void**>(dst) = lt_dlsym(h, name);
|
||||||
if (dst == nullptr)
|
if (*dst == nullptr)
|
||||||
throw std::runtime_error("Failed to resolve symbol '"s
|
throw std::runtime_error("Failed to resolve symbol '"s
|
||||||
+ name + "' in '" + file + "'.");
|
+ name + "' in '" + file + "'.");
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue