mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-22 13:30:06 +00:00
Possible fix for the login error bug.
This commit is contained in:
parent
4c06163b51
commit
be99714495
@ -29,10 +29,14 @@ void CNLoginServer::handlePacket(CNSocket* sock, CNPacketData* data) {
|
|||||||
std::string userLogin((char*)login->szCookie_TEGid);
|
std::string userLogin((char*)login->szCookie_TEGid);
|
||||||
std::string userPassword((char*)login->szCookie_authid);
|
std::string userPassword((char*)login->szCookie_authid);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The std::string -> char* -> std::string maneuver should remove any
|
||||||
|
* trailing garbage after the null terminator.
|
||||||
|
*/
|
||||||
if (userLogin.length() == 0)
|
if (userLogin.length() == 0)
|
||||||
userLogin = U16toU8(login->szID);
|
userLogin = std::string(U16toU8(login->szID).c_str());
|
||||||
if (userPassword.length() == 0)
|
if (userPassword.length() == 0)
|
||||||
userPassword = U16toU8(login->szPassword);
|
userPassword = std::string(U16toU8(login->szPassword).c_str());
|
||||||
|
|
||||||
bool success = false;
|
bool success = false;
|
||||||
int errorCode = 0;
|
int errorCode = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user