From 9a2c94ef652966bad305f43a8920a5e208230774 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 10 Dec 2022 14:10:37 -0500 Subject: Undefined behaviour was causing user IDs to not be sent to scoreboard --- lingo.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lingo.cpp') diff --git a/lingo.cpp b/lingo.cpp index 4c43d9c..c5e34f6 100644 --- a/lingo.cpp +++ b/lingo.cpp @@ -328,12 +328,13 @@ public: std::string avatar_url = event.msg.author.get_avatar_url(); easy.escape(avatar_url); + std::string user_id_str = std::to_string(static_cast(event.msg.author.id)); // Forms creation curl::curl_pair username_form(CURLFORM_COPYNAME,"username"); curl::curl_pair username_cont(CURLFORM_COPYCONTENTS,event.msg.author.username); curl::curl_pair pass_form(CURLFORM_COPYNAME,"user_id"); - curl::curl_pair pass_cont(CURLFORM_COPYCONTENTS,std::to_string(static_cast(event.msg.author.id))); + curl::curl_pair pass_cont(CURLFORM_COPYCONTENTS,user_id_str); curl::curl_pair av_form(CURLFORM_COPYNAME,"avatar_url"); curl::curl_pair av_cont(CURLFORM_COPYCONTENTS,avatar_url); curl::curl_pair code_form(CURLFORM_COPYNAME,"secret_code"); -- cgit 1.4.1