mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-23 00:12:51 +02:00
fix compiling error
also bug, I had some weird formatting that broke the json parsing
This commit is contained in:
@@ -100,10 +100,11 @@ RequestBroker::ProcessResponse APIRequest::Process(RequestBroker & rb)
|
|||||||
std::cout << typeid(*this).name() << " Authenticated " << std::endl;
|
std::cout << typeid(*this).name() << " Authenticated " << std::endl;
|
||||||
User user = Client::Ref().GetAuthUser();
|
User user = Client::Ref().GetAuthUser();
|
||||||
char userName[12];
|
char userName[12];
|
||||||
char userSession[user.SessionID.length() + 1];
|
char *userSession = new char[user.SessionID.length() + 1];
|
||||||
std::strcpy(userName, format::NumberToString<int>(user.ID).c_str());
|
std::strcpy(userName, format::NumberToString<int>(user.ID).c_str());
|
||||||
std::strcpy(userSession, user.SessionID.c_str());
|
std::strcpy(userSession, user.SessionID.c_str());
|
||||||
HTTPContext = http_multipart_post_async((char*)URL.c_str(), postNames, postData, postLength, userName, NULL, userSession);
|
HTTPContext = http_multipart_post_async((char*)URL.c_str(), postNames, postData, postLength, userName, NULL, userSession);
|
||||||
|
delete userSession;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user