Aaron
Aaron

Reputation: 2883

How to check if a NULL character is in a string when debugging with WinDbg

For instance:

0:000> ?? testFile //check this variable
char * 0x009c6758
 "e:\TEST\example.FOO"

Question:

Upvotes: 1

Views: 648

Answers (1)

Michael
Michael

Reputation: 55435

It's clearly there since you are seeing a valid string and not several junk characters afterwards.

db poi(testFile)

Will dump the raw bytes in the string to the console and you'll be able to see a 0 byte at the end. You can also use the memory window to see the zero byte at the end of the string as well.

Upvotes: 2

Related Questions