summary refs log tree commit diff stats
path: root/lingo.cpp
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2022-12-10 14:10:37 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2022-12-10 14:10:37 -0500
commit9a2c94ef652966bad305f43a8920a5e208230774 (patch)
tree5217b93c7b426887ac95b2d7afd0b9586b604d6e /lingo.cpp
parent5d516b9adea62c30a861c17de10002254c4427d0 (diff)
downloadlingo-9a2c94ef652966bad305f43a8920a5e208230774.tar.gz
lingo-9a2c94ef652966bad305f43a8920a5e208230774.tar.bz2
lingo-9a2c94ef652966bad305f43a8920a5e208230774.zip
Undefined behaviour was causing user IDs to not be sent to scoreboard
Diffstat (limited to 'lingo.cpp')
-rw-r--r--lingo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lingo.cpp b/lingo.cpp index 4c43d9c..c5e34f6 100644 --- a/lingo.cpp +++ b/lingo.cpp
@@ -328,12 +328,13 @@ public:
328 328
329 std::string avatar_url = event.msg.author.get_avatar_url(); 329 std::string avatar_url = event.msg.author.get_avatar_url();
330 easy.escape(avatar_url); 330 easy.escape(avatar_url);
331 std::string user_id_str = std::to_string(static_cast<uint64_t>(event.msg.author.id));
331 332
332 // Forms creation 333 // Forms creation
333 curl::curl_pair<CURLformoption,std::string> username_form(CURLFORM_COPYNAME,"username"); 334 curl::curl_pair<CURLformoption,std::string> username_form(CURLFORM_COPYNAME,"username");
334 curl::curl_pair<CURLformoption,std::string> username_cont(CURLFORM_COPYCONTENTS,event.msg.author.username); 335 curl::curl_pair<CURLformoption,std::string> username_cont(CURLFORM_COPYCONTENTS,event.msg.author.username);
335 curl::curl_pair<CURLformoption,std::string> pass_form(CURLFORM_COPYNAME,"user_id"); 336 curl::curl_pair<CURLformoption,std::string> pass_form(CURLFORM_COPYNAME,"user_id");
336 curl::curl_pair<CURLformoption,std::string> pass_cont(CURLFORM_COPYCONTENTS,std::to_string(static_cast<uint64_t>(event.msg.author.id))); 337 curl::curl_pair<CURLformoption,std::string> pass_cont(CURLFORM_COPYCONTENTS,user_id_str);
337 curl::curl_pair<CURLformoption,std::string> av_form(CURLFORM_COPYNAME,"avatar_url"); 338 curl::curl_pair<CURLformoption,std::string> av_form(CURLFORM_COPYNAME,"avatar_url");
338 curl::curl_pair<CURLformoption,std::string> av_cont(CURLFORM_COPYCONTENTS,avatar_url); 339 curl::curl_pair<CURLformoption,std::string> av_cont(CURLFORM_COPYCONTENTS,avatar_url);
339 curl::curl_pair<CURLformoption,std::string> code_form(CURLFORM_COPYNAME,"secret_code"); 340 curl::curl_pair<CURLformoption,std::string> code_form(CURLFORM_COPYNAME,"secret_code");