mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-24 17:49:52 +01:00
fix warnings
This commit is contained in:
parent
fb858f3f08
commit
d8f29883b7
@ -1351,7 +1351,7 @@ static DWORD cfg_get_game_section(LPSTR buf, DWORD size)
|
|||||||
|
|
||||||
if (ini_section_exists(&g_config.ini, section))
|
if (ini_section_exists(&g_config.ini, section))
|
||||||
{
|
{
|
||||||
strncpy(buf, section, size - 1);
|
strncpy(buf, section, size);
|
||||||
buf[size - 1] = 0;
|
buf[size - 1] = 0;
|
||||||
return strlen(buf);
|
return strlen(buf);
|
||||||
}
|
}
|
||||||
@ -1363,14 +1363,14 @@ static DWORD cfg_get_game_section(LPSTR buf, DWORD size)
|
|||||||
{
|
{
|
||||||
if (FILE_EXISTS(tmp))
|
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;
|
buf[size - 1] = 0;
|
||||||
return strlen(buf);
|
return strlen(buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strncpy(buf, g_config.process_file_name, size - 1);
|
strncpy(buf, g_config.process_file_name, size);
|
||||||
buf[size - 1] = 0;
|
buf[size - 1] = 0;
|
||||||
return strlen(buf);
|
return strlen(buf);
|
||||||
}
|
}
|
||||||
@ -1387,7 +1387,7 @@ static DWORD cfg_get_game_section(LPSTR buf, DWORD size)
|
|||||||
{
|
{
|
||||||
if (FILE_EXISTS(tmp))
|
if (FILE_EXISTS(tmp))
|
||||||
{
|
{
|
||||||
strncpy(buf, section, size - 1);
|
strncpy(buf, section, size);
|
||||||
buf[size - 1] = 0;
|
buf[size - 1] = 0;
|
||||||
return strlen(buf);
|
return strlen(buf);
|
||||||
}
|
}
|
||||||
|
@ -1468,7 +1468,7 @@ HWND WINAPI fake_CreateWindowExA(
|
|||||||
if (!dwExStyle &&
|
if (!dwExStyle &&
|
||||||
HIWORD(lpClassName) && _strcmpi(lpClassName, "OMWindowChildClass") == 0 &&
|
HIWORD(lpClassName) && _strcmpi(lpClassName, "OMWindowChildClass") == 0 &&
|
||||||
!lpWindowName &&
|
!lpWindowName &&
|
||||||
dwStyle == WS_CHILD | WS_CHILDWINDOW | WS_CLIPSIBLINGS &&
|
dwStyle == (WS_CHILD | WS_CHILDWINDOW | WS_CLIPSIBLINGS) &&
|
||||||
!X &&
|
!X &&
|
||||||
!Y &&
|
!Y &&
|
||||||
g_ddraw.ref && g_ddraw.width && g_ddraw.width == nWidth && g_ddraw.height == nHeight &&
|
g_ddraw.ref && g_ddraw.width && g_ddraw.width == nWidth && g_ddraw.height == nHeight &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user