Skip to content

Commit 2f02fc7

Browse files
committed
MacOS Discord Integration Crash Fix
Set locale on DPP client connect
1 parent e27af69 commit 2f02fc7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

SerialPrograms/Source/Integrations/DppIntegration/DppClient.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#ifdef PA_DPP
22

33
#include <set>
4+
#include <locale>
5+
#include <clocale>
46
#include <dpp/dpp.h>
57
#include "Common/Cpp/Json/JsonArray.h"
68
#include "Common/Cpp/Json/JsonObject.h"
@@ -49,6 +51,10 @@ void Client::connect(){
4951

5052
std::string token = settings.integration.token;
5153
uint32_t intents = intents::i_default_intents | intents::i_guild_members | intents::i_message_content;
54+
55+
std::setlocale(LC_TIME, "C");
56+
std::locale::global(std::locale::classic());
57+
5258
try{
5359
m_bot = std::make_unique<cluster>(token, intents);
5460
m_handler = std::make_unique<commandhandler>(m_bot.get(), false);

0 commit comments

Comments
 (0)