Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.1.13 #185

Merged
merged 2 commits into from
Feb 13, 2024
Merged

Release v0.1.13 #185

merged 2 commits into from
Feb 13, 2024

Conversation

plietar
Copy link
Member

@plietar plietar commented Feb 13, 2024

No description provided.

The `Event::should_trigger` method uses `.begin()` on the set of times
at which it needs to fire to compare that value with the current tick.
However it was missing a check in the case of an empty set. When that
happens, `begin()` returns a pointer to uninitialized memory and we we
reading garbage out of it. If that garbage happens to be equal to the
current time step, the event would fire spuriously, even though it
wasn't meant to.

The fix is straightforward: we just need to check if the set is empty
before reading from the set. If it is empty then the event never
triggers.
@plietar plietar requested a review from giovannic February 13, 2024 13:32
Copy link

codecov bot commented Feb 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (877fa6b) 96.25% compared to head (576fe29) 96.26%.
Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #185   +/-   ##
=======================================
  Coverage   96.25%   96.26%           
=======================================
  Files          36       36           
  Lines        1817     1819    +2     
=======================================
+ Hits         1749     1751    +2     
  Misses         68       68           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@giovannic giovannic merged commit 29dc47a into master Feb 13, 2024
8 checks passed
@giovannic giovannic deleted the release/0.1.13 branch February 13, 2024 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants