diff options
author | rubidium <rubidium@openttd.org> | 2008-09-24 23:25:24 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-09-24 23:25:24 +0000 |
commit | 48ece47bd940bd1a103b0e6344c859571dcc182f (patch) | |
tree | 55ef97f884a427b5807de2b489c5f2659cf4caa0 /src/video/win32_v.cpp | |
parent | 4057132b00ee226aec5ba937b2ef6a5a531c8c73 (diff) | |
download | openttd-48ece47bd940bd1a103b0e6344c859571dcc182f.tar.xz |
(svn r14397) -Fix: possible buffer overrun, wrong parameter type passed to printf and && where || is meant. Found by MSVC's code analysis (Darkvater)
Diffstat (limited to 'src/video/win32_v.cpp')
-rw-r--r-- | src/video/win32_v.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp index 2bbb96c63..9016c93e8 100644 --- a/src/video/win32_v.cpp +++ b/src/video/win32_v.cpp @@ -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"); |