diff --git a/ChangeLog b/ChangeLog index 7dc653c18..cc54dd62e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,8 @@ - `enumpoly` would take a very long time on some supports where an equilibrium is located on the boundary of the projected game. Search is now restricted to the interior of the space ruling these out; these will always be found by another projection. (#756) +- In the graphical interface, the logit correspondence display would fail and terminate the program + on very small (<10^{-300}) probabilities. ## [16.5.1] - unreleased diff --git a/src/gui/dlefglogit.cc b/src/gui/dlefglogit.cc index dc925710e..e74ce5b64 100644 --- a/src/gui/dlefglogit.cc +++ b/src/gui/dlefglogit.cc @@ -171,7 +171,12 @@ void LogitBehavList::AddProfile(const wxString &p_text, bool p_forceShow) } m_lambdas.push_back(std::stod(next.ToStdString())); for (size_t i = 1; i <= profile->BehaviorProfileLength(); i++) { - (*profile)[i] = std::stod(tok.GetNextToken().ToStdString()); + try { + (*profile)[i] = std::stod(tok.GetNextToken().ToStdString()); + } + catch (std::out_of_range &) { + (*profile)[i] = 0.0; + } } m_profiles.push_back(profile); if (p_forceShow || m_profiles.size() - GetNumberRows() > 20) { diff --git a/src/gui/dlnfglogit.cc b/src/gui/dlnfglogit.cc index c30602ddc..794b02c28 100644 --- a/src/gui/dlnfglogit.cc +++ b/src/gui/dlnfglogit.cc @@ -77,7 +77,12 @@ void LogitMixedBranch::AddProfile(const wxString &p_text) m_lambdas.push_back(std::stod(next.ToStdString())); for (size_t i = 1; i <= profile->MixedProfileLength(); i++) { - (*profile)[i] = std::stod(tok.GetNextToken().ToStdString()); + try { + (*profile)[i] = std::stod(tok.GetNextToken().ToStdString()); + } + catch (std::out_of_range &) { + (*profile)[i] = 0.0; + } } m_profiles.push_back(profile);