1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-20 23:50:27 +00:00

racing:: fixed racetimeformat, wrong digit was bounded to <6

This commit is contained in:
Zeno Rogue 2018-12-23 13:12:18 +01:00
parent 9a47148ae7
commit 39067a83df

View File

@ -742,7 +742,7 @@ string racetimeformat(int t) {
bool minus = (t < 0); bool minus = (t < 0);
if(t < 0) t = -t; if(t < 0) t = -t;
while(t || digits < 6) { while(t || digits < 6) {
int mby = (digits == 5 ? 6 : 10); int mby = (digits == 4 ? 6 : 10);
times = char('0'+(t%mby)) + times; times = char('0'+(t%mby)) + times;
t /= mby; digits++; t /= mby; digits++;
if(digits == 3) times = "." + times; if(digits == 3) times = "." + times;