From f6dc6a51dd9769ea52f67e104816827cdb31466d Mon Sep 17 00:00:00 2001 From: Emma Miler <27428383+emma-miler@users.noreply.github.com> Date: Sun, 24 Apr 2022 00:10:43 +0200 Subject: Fix debug builds (#150) Properly initializes AuthData structs where used. This does not get done automatically in debug mode because c++ is weird like that --- NorthstarDedicatedTest/masterserver.cpp | 2 +- NorthstarDedicatedTest/serverauthentication.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NorthstarDedicatedTest/masterserver.cpp b/NorthstarDedicatedTest/masterserver.cpp index ab6388c3..9c719157 100644 --- a/NorthstarDedicatedTest/masterserver.cpp +++ b/NorthstarDedicatedTest/masterserver.cpp @@ -606,7 +606,7 @@ void MasterServerManager::AuthenticateWithOwnServer(char* uid, char* playerToken goto REQUEST_END_CLEANUP; } - AuthData newAuthData; + AuthData newAuthData {}; strncpy(newAuthData.uid, authInfoJson["id"].GetString(), sizeof(newAuthData.uid)); newAuthData.uid[sizeof(newAuthData.uid) - 1] = 0; diff --git a/NorthstarDedicatedTest/serverauthentication.cpp b/NorthstarDedicatedTest/serverauthentication.cpp index 46fa6491..e89c4e92 100644 --- a/NorthstarDedicatedTest/serverauthentication.cpp +++ b/NorthstarDedicatedTest/serverauthentication.cpp @@ -113,7 +113,7 @@ void ServerAuthenticationManager::StartPlayerAuthServer() return; } - AuthData newAuthData; + AuthData newAuthData {}; strncpy(newAuthData.uid, request.get_param_value("id").c_str(), sizeof(newAuthData.uid)); newAuthData.uid[sizeof(newAuthData.uid) - 1] = 0; -- cgit v1.2.3