1
0
Fork 0

BRIDGE+LAUNCHER: fixed some more CRT warnings

This commit is contained in:
Duncan Ogilvie 2017-10-08 16:23:20 +02:00
parent 57235b2f24
commit cd9bbb1189
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
2 changed files with 4 additions and 4 deletions

View File

@ -150,9 +150,9 @@ BRIDGE_IMPEXP bool BridgeSettingGetUint(const char* section, const char* key, du
if(!BridgeSettingGet(section, key, newvalue))
return false;
#ifdef _WIN64
int ret = sscanf(newvalue, "%llX", value);
int ret = sscanf_s(newvalue, "%llX", value);
#else
int ret = sscanf(newvalue, "%X", value);
int ret = sscanf_s(newvalue, "%X", value);
#endif //_WIN64
if(ret)
return true;

View File

@ -124,7 +124,7 @@ static HRESULT AddDesktopShortcut(TCHAR* szPathOfFile, const TCHAR* szNameOfLink
if(SUCCEEDED(hRes))
{
TCHAR path[MAX_PATH + 1] = TEXT("");
_tmakepath(path, nullptr, GetDesktopPath(), szNameOfLink, TEXT("lnk"));
_tmakepath_s(path, nullptr, GetDesktopPath(), szNameOfLink, TEXT("lnk"));
CComBSTR tmp(path);
hRes = ppf->Save(tmp, TRUE);
}
@ -406,7 +406,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
if(szIniPath[len] == TEXT('\\'))
_tcscat_s(szIniPath, TEXT(".ini"));
else
_tcscpy(&szIniPath[len], TEXT(".ini"));
_tcscpy_s(&szIniPath[len], _countof(szIniPath) - len, TEXT(".ini"));
CreateUnicodeFile(szIniPath);
//Load settings