Skip to content

Commit

Permalink
Fix a crash (division by zero) if a player reports zero FPS
Browse files Browse the repository at this point in the history
  • Loading branch information
M-Reimer committed Jan 26, 2024
1 parent cef0d0c commit 32fd09c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ GLCD::cType TimeType(time_t Time, const std::string &Format)
GLCD::cType DurationType(int Index, const std::string &Format, double framesPerSecFactor = 1.0)
{
static char result[1000];
if (Index > 0)
if (Index > 0 && framesPerSecFactor > 0.0)
{
if (Format.length() > 0)
{
Expand Down

0 comments on commit 32fd09c

Please sign in to comment.