mirror of
https://github.com/reactos/reactos.git
synced 2024-11-04 22:00:55 +00:00
don't try to copy lpToken when it is NULL
svn path=/trunk/; revision=30446
This commit is contained in:
parent
f29cdc46e5
commit
16e92aa3e5
2 changed files with 7 additions and 5 deletions
|
@ -36,7 +36,7 @@ DoOpenFile(PINFO pInfo)
|
|||
static WCHAR szFilter[] = L"Remote Desktop Files (*rdp)\0*.rdp\0";
|
||||
|
||||
ZeroMemory(&ofn, sizeof(ofn));
|
||||
ofn.lStructSize = sizeof(OPENFILENAME);
|
||||
ofn.lStructSize = sizeof(OPENFILENAMEW);
|
||||
ofn.hwndOwner = pInfo->hGeneralPage;
|
||||
ofn.nMaxFile = MAX_PATH;
|
||||
ofn.nMaxFileTitle = MAX_PATH;
|
||||
|
@ -62,7 +62,7 @@ DoSaveAs(PINFO pInfo)
|
|||
static WCHAR szFilter[] = L"Remote Desktop Files (*rdp)\0*.rdp\0";
|
||||
|
||||
ZeroMemory(&ofn, sizeof(ofn));
|
||||
ofn.lStructSize = sizeof(OPENFILENAME);
|
||||
ofn.lStructSize = sizeof(OPENFILENAMEW);
|
||||
ofn.hwndOwner = pInfo->hGeneralPage;
|
||||
ofn.nMaxFile = MAX_PATH;
|
||||
ofn.nMaxFileTitle = MAX_PATH;
|
||||
|
@ -1118,7 +1118,7 @@ DlgProc(HWND hDlg,
|
|||
txtRc.right = bmpRc.right * 0.75;
|
||||
txtRc.bottom = pInfo->headerbitmap.bmHeight * 0.5;
|
||||
|
||||
ZeroMemory(&lf, sizeof(LOGFONT));
|
||||
ZeroMemory(&lf, sizeof(LOGFONTW));
|
||||
|
||||
if (LoadStringW(hInst,
|
||||
IDS_HEADERTEXT1,
|
||||
|
|
|
@ -252,12 +252,14 @@ ParseSettings(PRDPSETTINGS pRdpSettings,
|
|||
{
|
||||
pRdpSettings->pSettings[i].Type = lpToken[0];
|
||||
lpToken = wcstok(NULL, szSeps);
|
||||
if (lpToken != NULL)
|
||||
pRdpSettings->pSettings[i].Value.i = _wtoi(lpToken);
|
||||
}
|
||||
else if (lpToken[0] == L's')
|
||||
{
|
||||
pRdpSettings->pSettings[i].Type = lpToken[0];
|
||||
lpToken = wcstok(NULL, szSeps);
|
||||
if (lpToken != NULL)
|
||||
wcscpy(pRdpSettings->pSettings[i].Value.s, lpToken);
|
||||
}
|
||||
bFound = TRUE;
|
||||
|
|
Loading…
Reference in a new issue