FIX: Intrinsic Version of strcmp May Return Incorrect Result (167326)
The information in this article applies to:
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
This article was previously published under Q167326 SYMPTOMS
Explicitly referencing the Null character in the second argument of strcmp
causes the intrinsic version of strcmp to incorrectly report the two
arguments are not equal. Please see the sample code below.
RESOLUTION
Use one of the following two workarounds:
- Do not explicitly reference the Null character.
- Do not use the intrinsic version of strcmp.
Please see the "MORE INFORMATION" section and sample code below.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
This problem was corrected in Microsoft Visual C++ .NET.
Modification Type: | Major | Last Reviewed: | 12/10/2003 |
---|
Keywords: | kbBug kbcode kbfix kbNoUpdate kbProgramming KB167326 |
---|
|