[ros-dev] Re: [ros-diffs] [cwittich] 20720: fix building with MSVC

Thomas Weidenmueller w3seek at reactos.com
Sun Jan 8 20:34:21 CET 2006

Thomas Weidenmueller wrote:
> cwittich at svn.reactos.org wrote:
>> -    GetFileTitle(szFileName, Globals.szFileTitle, sizeof(Globals.szFileTitle));
>> +    GetFileTitle(szFileName, Globals.szFileTitle, wcslen(Globals.szFileTitle));
> This change is wrong, sizeof(Globals.szFileTitle) is correct. The last
> parameter is the size of the buffer the second parameter represents.

I mean, sizeof(Globals.szFileTitle) / sizeof(Globals.szFileTitle[0])
would be correct.

- Thomas

More information about the Ros-dev mailing list