mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
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:
parent
7d3fdec98a
commit
9f41b5d910
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue