I found an implementation that compares two LPCSTRs by doing the following:
void check(LPCSTR lpText)
{
if(lpText == input)
{
// do stuff
}
}
The problem is that it works. I replaced it ...
if(lstrcmpi(lpText, input) == 0)
{
// do stuff
}
and now I feel safer.
I just wanted to know if the other implementation was just checking addresses or sizes, how does it work?
I checked the memory address of one LPCSTR and 0x0633522c and the other 0x028a91a4.
It shakes my whole foundation.
source
share