Knowledge Base

BUG: Character Constant with \0 Not Stored Properly

Article ID: 122790

Article Last Modified on 7/5/2005


APPLIES TO


This article was previously published under Q122790

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

				

Keywords: kbbug kbide kbdebug kbpending kbcode KB122790