Skip to content
Browse files

Added divide by zero guard for -time

  • Loading branch information...
1 parent f8b02f8 commit 673dbac9d5ae92b214194277c63e154a2af9ceb1 @kthakore kthakore committed Jan 5, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/04-game.pod
View
2 src/04-game.pod
@@ -200,7 +200,7 @@ read on to the problems below.
else {
# Our frame rate is our Frames * 100 / Time Elapsed in us
- $FPS = int( ( $frames * 100 ) / $delta_time );
+ $FPS = int( ( $frames * 100 ) / $delta_time ) if $delta_time != 0;
# Reset our metrics
$frames = 0;

0 comments on commit 673dbac

Please sign in to comment.
Something went wrong with that request. Please try again.