1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 06:04:49 +01:00

fix warnings

This commit is contained in:
FunkyFr3sh 2024-06-01 07:41:03 +02:00
parent fb858f3f08
commit d8f29883b7
2 changed files with 5 additions and 5 deletions

View File

@ -1351,7 +1351,7 @@ static DWORD cfg_get_game_section(LPSTR buf, DWORD size)
if (ini_section_exists(&g_config.ini, section))
{
strncpy(buf, section, size - 1);
strncpy(buf, section, size);
buf[size - 1] = 0;
return strlen(buf);
}
@ -1363,14 +1363,14 @@ static DWORD cfg_get_game_section(LPSTR buf, DWORD size)
{
if (FILE_EXISTS(tmp))
{
strncpy(buf, g_config.process_file_name, size - 1);
strncpy(buf, g_config.process_file_name, size);
buf[size - 1] = 0;
return strlen(buf);
}
}
else
{
strncpy(buf, g_config.process_file_name, size - 1);
strncpy(buf, g_config.process_file_name, size);
buf[size - 1] = 0;
return strlen(buf);
}
@ -1387,7 +1387,7 @@ static DWORD cfg_get_game_section(LPSTR buf, DWORD size)
{
if (FILE_EXISTS(tmp))
{
strncpy(buf, section, size - 1);
strncpy(buf, section, size);
buf[size - 1] = 0;
return strlen(buf);
}

View File

@ -1468,7 +1468,7 @@ HWND WINAPI fake_CreateWindowExA(
if (!dwExStyle &&
HIWORD(lpClassName) && _strcmpi(lpClassName, "OMWindowChildClass") == 0 &&
!lpWindowName &&
dwStyle == WS_CHILD | WS_CHILDWINDOW | WS_CLIPSIBLINGS &&
dwStyle == (WS_CHILD | WS_CHILDWINDOW | WS_CLIPSIBLINGS) &&
!X &&
!Y &&
g_ddraw.ref && g_ddraw.width && g_ddraw.width == nWidth && g_ddraw.height == nHeight &&