diff --git a/reactos/base/applications/mstsc/connectdialog.c b/reactos/base/applications/mstsc/connectdialog.c index b5716beb6b0..ae63377800a 100644 --- a/reactos/base/applications/mstsc/connectdialog.c +++ b/reactos/base/applications/mstsc/connectdialog.c @@ -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, diff --git a/reactos/base/applications/mstsc/settings.c b/reactos/base/applications/mstsc/settings.c index 1e745c993fa..29a6d47ba30 100644 --- a/reactos/base/applications/mstsc/settings.c +++ b/reactos/base/applications/mstsc/settings.c @@ -252,13 +252,15 @@ ParseSettings(PRDPSETTINGS pRdpSettings, { pRdpSettings->pSettings[i].Type = lpToken[0]; lpToken = wcstok(NULL, szSeps); - pRdpSettings->pSettings[i].Value.i = _wtoi(lpToken); + 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); - wcscpy(pRdpSettings->pSettings[i].Value.s, lpToken); + if (lpToken != NULL) + wcscpy(pRdpSettings->pSettings[i].Value.s, lpToken); } bFound = TRUE; }