mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 18:59:09 +00:00
Fix winmain use and a couple of remaining SafeStrings => plString
This commit is contained in:
@ -872,7 +872,7 @@ static void LoadUserPass (LoginDialogParam *pLoginParam)
|
||||
ZeroMemory(cryptKey, sizeof(cryptKey));
|
||||
GetCryptKey(cryptKey, arrsize(cryptKey));
|
||||
|
||||
char* temp;
|
||||
plString temp;
|
||||
pLoginParam->remember = false;
|
||||
pLoginParam->username[0] = '\0';
|
||||
|
||||
@ -891,12 +891,11 @@ static void LoadUserPass (LoginDialogParam *pLoginParam)
|
||||
|
||||
if (memcmp(cryptKey, savedKey, sizeof(savedKey)) == 0)
|
||||
{
|
||||
temp = stream->ReadSafeString();
|
||||
temp = stream->ReadSafeString_TEMP();
|
||||
|
||||
if (temp)
|
||||
if (!temp.IsEmpty())
|
||||
{
|
||||
StrCopy(pLoginParam->username, temp, kMaxAccountNameLength);
|
||||
delete[] temp;
|
||||
StrCopy(pLoginParam->username, temp.c_str(), kMaxAccountNameLength);
|
||||
}
|
||||
|
||||
pLoginParam->remember = stream->ReadBool();
|
||||
|
Reference in New Issue
Block a user