From b2d88d715303d31262164b5c8493126a03666ddb Mon Sep 17 00:00:00 2001 From: Jerome Dubois Date: Mon, 23 Nov 2020 09:58:20 +0100 Subject: [PATCH] * spot/twa/twagraph: Fix undefined behavior. --- spot/twa/twagraph.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spot/twa/twagraph.cc b/spot/twa/twagraph.cc index fb71c099e..38e302c96 100644 --- a/spot/twa/twagraph.cc +++ b/spot/twa/twagraph.cc @@ -306,7 +306,7 @@ namespace spot // 32th bit (i.e., the sign bit) of todo[x] indicates whether // states number x has been seen. std::vector todo(num_states, 0); - const unsigned seen = 1 << (sizeof(unsigned)*8-1); + const unsigned seen = 1U << (sizeof(unsigned)*8-1); const unsigned mask = seen - 1; unsigned todo_pos = 0; for (unsigned i: univ_dests(get_init_state_number()))