diff --git a/swad_changelog.h b/swad_changelog.h index bbab58192..792ab6d8f 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -460,10 +460,11 @@ En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 18.140 (2019-09-09)" +#define Log_PLATFORM_VERSION "SWAD 18.140.1 (2019-09-09)" #define CSS_FILE "swad18.138.css" #define JS_FILE "swad18.130.2.js" /* + Version 18.140.1: Sep 09, 2019 Fixed bug in matches. (244217 lines) Version 18.140: Sep 09, 2019 Font awesome used for matches. (244211 lines) Copy the following icons to public directory: sudo cp -a fontawesome /var/www/html/swad/ diff --git a/swad_game.c b/swad_game.c index ee6b251b9..67d0a66c3 100644 --- a/swad_game.c +++ b/swad_game.c @@ -3444,20 +3444,26 @@ static void Gam_GetElapsedTime (unsigned NumRows,MYSQL_RES *mysql_res, char HHHMMSS[3 + 1 + 2 + 1 + 2 + 1]) { MYSQL_ROW row; + bool ElapsedTimeGotFromDB = false; if (NumRows) { row = mysql_fetch_row (mysql_res); - /* Get the elapsed time (row[0]) */ - if (strlen (row[0]) > 2 + 1 + 2 + 1 + 2) - Str_Copy (HHHMMSS,"+99:59:59", - Gam_MAX_BYTES_TITLE); - else - Str_Copy (HHHMMSS,row[0], - Gam_MAX_BYTES_TITLE); + if (row[0]) + { + /* Get the elapsed time (row[0]) */ + if (strlen (row[0]) > 2 + 1 + 2 + 1 + 2) + Str_Copy (HHHMMSS,"+99:59:59", + Gam_MAX_BYTES_TITLE); + else + Str_Copy (HHHMMSS,row[0], + Gam_MAX_BYTES_TITLE); + ElapsedTimeGotFromDB = true; + } } - else + + if (!ElapsedTimeGotFromDB) Str_Copy (HHHMMSS,"00:00:00", Gam_MAX_BYTES_TITLE); }