(svn r14397) -Fix: possible buffer overrun, wrong parameter type passed to printf and && where || is meant. Found by MSVC's code analysis (Darkvater)

This commit is contained in:
rubidium
2008-09-24 23:25:24 +00:00
parent 4057132b00
commit 48ece47bd9
3 changed files with 6 additions and 6 deletions

View File

@@ -289,7 +289,7 @@ static bool MakeWindow(bool full_screen)
} else {
TCHAR Windowtitle[50];
_sntprintf(Windowtitle, sizeof(Windowtitle), _T("OpenTTD %s"), MB_TO_WIDE(_openttd_revision));
_sntprintf(Windowtitle, lengthof(Windowtitle), _T("OpenTTD %s"), MB_TO_WIDE(_openttd_revision));
_wnd.main_wnd = CreateWindow(_T("OTTD"), Windowtitle, style, x, y, w, h, 0, 0, GetModuleHandle(NULL), 0);
if (_wnd.main_wnd == NULL) usererror("CreateWindow failed");