Skip to content
Commit 39c45210 authored by Dom Rushbrook's avatar Dom Rushbrook
Browse files

sprintf(out,"%2ldd%2ldh",t/86400, (t%86400)/3600); overflowed static char...

sprintf(out,"%2ldd%2ldh",t/86400, (t%86400)/3600); overflowed static char out[7] when t > 100days as %2ld only states a minimum width.
Changed out to allow for the longest possible string that sprintf can make from a 64bit unsigned long '106751991167300d15h' (20 chars including the null)
Fixes #22
parent f77c5ea7
Loading
Loading
Loading
Loading
  • Author Maintainer

    oops copy pasted the wrong stupidly long idle time in from my test. The longest is actually '213503982334601d 7h' but it's still 20 chars long.

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment