diff --git a/common/database.cpp b/common/database.cpp index e856175a4..8559bc940 100644 --- a/common/database.cpp +++ b/common/database.cpp @@ -304,7 +304,11 @@ int16 Database::CheckStatus(uint32 account_id) int16 status = atoi(row[0]); - int32 suspendeduntil = atoi(row[1]); + int32 suspendeduntil = 0; + // MariaDB initalizes with NULL if unix_timestamp() is out of range + if (row[1] != NULL) { + suspendeduntil = atoi(row[1]); + } int32 current = atoi(row[2]);