GNOME Bugzilla – Bug 721722
Game ended due to time, but 1s is left on timer
Last modified: 2014-12-05 16:15:04 UTC
Created attachment 265567 [details] 1s left See screenshot
Created attachment 278475 [details] [review] Bug fix The timer should now correctly display 0 seconds when time runs out.
I would say that this looks good and is minimally invasive. Michael will do a proper review, once he is back. Thanks :)
Review of attachment 278475 [details] [review]: Good job, Nikhar. You pinpointed the code that was wrong and found a solution that seems to work. I think we need to be even more careful here, though, since there's no guarantee which callback will be invoked first. I think the best way to do this would be to remove timer_expired_cb() completely, and check whether the timer has expired at the bottom of tick_cb() instead. (This probably has to be done after calling tick() because tick() is the signal that causes the timer labels to be updated.)
The following fix has been pushed: 072e12f Fix game ending with 1s left on timer
Created attachment 286244 [details] [review] Fix game ending with 1s left on timer
072e12f broke the pause functionality and is the root cause for BUG741119. Pause works fine till c65d952. I'll come up with a patch for fixing 741119 soon.