diff --git a/dGame/dUtilities/CheatDetection.cpp b/dGame/dUtilities/CheatDetection.cpp index 9e1f597c7..ce8417106 100644 --- a/dGame/dUtilities/CheatDetection.cpp +++ b/dGame/dUtilities/CheatDetection.cpp @@ -29,7 +29,7 @@ void ReportCheat(User* user, const SystemAddress& sysAddr, const char* messageIf std::unique_ptr stmt(Database::CreatePreppedStmt( "INSERT INTO player_cheat_detections (account_id, name, violation_msg, violation_system_address) VALUES (?, ?, ?, ?)") ); - stmt->setInt(1, user ? user->GetAccountID() : 0); + user ? stmt->setInt(1, user->GetAccountID()) : stmt->setNull(1, sql::DataType::INTEGER); stmt->setString(2, user ? user->GetUsername().c_str() : "User is null."); constexpr int32_t bufSize = 4096;