Fix /mapinfo displaying a time when not having finished

The C API doesn't return 0.0f for NULL values, check for them
explicitly.

Fixes #3653.
This commit is contained in:
heinrich5991 2021-03-01 00:37:38 +01:00
parent 7d3fdec98a
commit 9f41b5d910

View file

@ -454,10 +454,10 @@ bool CScore::MapInfoThread(IDbConnection *pSqlServer, const ISqlData *pGameData,
int Stars = pSqlServer->GetInt(5);
int Finishes = pSqlServer->GetInt(6);
int Finishers = pSqlServer->GetInt(7);
float Median = pSqlServer->GetInt(8);
float Median = !pSqlServer->IsNull(8) ? pSqlServer->GetInt(8) : -1.0f;
int Stamp = pSqlServer->GetInt(9);
int Ago = pSqlServer->GetInt(10);
float OwnTime = pSqlServer->GetFloat(11);
float OwnTime = !pSqlServer->IsNull(11) ? pSqlServer->GetFloat(11) : -1.0f;
char aAgoString[40] = "\0";
char aReleasedString[60] = "\0";