A class member of type bool is shown as false in the tooltip, although its actual value is 01. The compiled code executes correctly. This is a bug in Microsoft Visual Studio 2005 Version 8.0.50727.762 (SP.050727-7600). Using Microsoft Visual C++ 2005 77626-009-0389393-41585
class CMain : public CWnd
{
...
bool r;
...
};
in void CMain::OnLButtonDown, there is the code
if(r)
{
...
}
which, in the disassembly window, is
cmp byte ptr [esi+122Fh],0 in the release version, and
mov eax,dword ptr [ebp-14h]
movzx ecx,byte ptr [eax+122Fh]
test ecx,ecxin the debug version
followed by je in either case.
Checking the memory location shows the contents are 01, but the tooltip on the boolean variable r shows the value 'false'.