Article ID: 122790 - Last Review: July 5, 2005 - Revision: 1.1

BUG: Character Constant with \0 Not Stored Properly

This article was previously published under Q122790

On This Page

Expand all | Collapse all

SYMPTOMS

Character constants containing the escape character "\0" (octal) may not be stored properly. The escape character may be swapped with the character that immediately preceeds or follows it in memory.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Run the following sample code to demonstrate the problem.

Sample Code to Reproduce Problem


/* Compile options needed: none
*/ 

#include <stdio.h>

void main(void)
{
   printf("%08X", 'A\0H\0');
}

/* Output */ 

00410048

/* Expected Output */ 

41004800

				

APPLIES TO
  • Microsoft Visual C++ 4.2 Enterprise Edition
  • Microsoft Visual C++ 5.0 Enterprise Edition
  • Microsoft Visual C++ 6.0 Enterprise Edition
  • Microsoft Visual C++ 2.0 Professional Edition
  • Microsoft Visual C++ 4.0 Professional Edition
  • Microsoft Visual C++ 4.1 Subscription
  • Microsoft Visual C++ 4.2 Professional Edition
  • Microsoft Visual C++ 5.0 Professional Edition
  • Microsoft Visual C++ 6.0 Professional Edition
  • Microsoft Visual C++ 5.0 Learning Edition
  • Microsoft Visual C++, 32-bit Learning Edition 6.0
Keywords: 
kbbug kbide kbdebug kbpending kbcode KB122790
 

Article Translations