ATL bug - atlrx.h

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi,

There is a bug in atlrx.h near line 640, the passage below shows the bug. Applies for VS .NET 2002 and 2003.

===
case RE_RANGE:
{
	if (*sz == '\0')
	{
		ip = (size_t) pContext->Pop();
		break;
	}

	unsigned char *pBits = (unsigned char *) (&m_Instructions[ip]+1);

-->	// BUGFIX: Value is erroneously treated as signed
-->	//size_t u = (size_t) *sz;
-->	ATLASSERT(sizeof *sz == 1);
-->	size_t u = (size_t) (UCHAR) *sz;

	if (pBits[u >> 3] & 1 << (u & 0x7))
===

Roman
.