Skip to content

Commit

Permalink
Fix infinite loop issue
Browse files Browse the repository at this point in the history
  • Loading branch information
reiniscirpons committed Dec 19, 2023
1 parent b0b6639 commit b52cfc4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ pkginclude_HEADERS += include/libsemigroups/schreier-sims.hpp
pkginclude_HEADERS += include/libsemigroups/sims1.hpp
pkginclude_HEADERS += include/libsemigroups/sims1.tpp
pkginclude_HEADERS += include/libsemigroups/sims2.hpp
pkginclude_HEADERS += include/libsemigroups/sims2.tpp
pkginclude_HEADERS += include/libsemigroups/stephen.hpp
pkginclude_HEADERS += include/libsemigroups/stephen.tpp
pkginclude_HEADERS += include/libsemigroups/to-froidure-pin.hpp
Expand Down
2 changes: 1 addition & 1 deletion include/libsemigroups/sims1.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ namespace libsemigroups {
// Don't care about stats in this case
std::for_each(cbegin<iterator>(n), cend<iterator>(n), pred);
} else {
Subclass::stats().stats_zero();
stats().stats_zero();
detail::Ticker t([this]() { report_progress_from_thread(); });
auto it = cbegin<iterator>(n);
auto const last = cend<iterator>(n);
Expand Down
3 changes: 3 additions & 0 deletions include/libsemigroups/sims2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ namespace libsemigroups {
private:
size_t& used_slots(size_t num_edges) {
LIBSEMIGROUPS_ASSERT(num_edges < _used_slots.size());
if (_used_slots[0] == UNDEFINED) {
_used_slots[0] = 0;
}
size_t i = num_edges;
while (_used_slots[i] == UNDEFINED) {
--i;
Expand Down

0 comments on commit b52cfc4

Please sign in to comment.