Defined string with 4 characters is sizeof 4 in watch and 5 in compiled code.
| Newsgroups | gmane.comp.hardware.texas-instruments.msp430.discuss |
|---|---|
| Message-ID | <[email protected]> |
So, just out of curiosity, how can sizeof(LOGGER_SERIAL_DEFAULT) be both 4 (in the QuckWatch) and 5 in the compiled code (red line in disassembly) ? It's defined as: #define LOGGER_SERIAL_DEFAULT "----" So in my mind it should be 4 (if the compiler wanted to count the quotes it would be 6) but NEVER 5. http://e2e.ti.com/cfs-file.ashx/__key/communityserver-discussions-components-files/166/0552.delme.png http://e2e.ti.com/cfs-file.ashx/__key/communityserver-discussions-components-files/166/0552.delme.png http://e2e.ti.com/cfs-file.ashx/__key/communityserver-discussions-components-files/166/0552.delme.png http://e2e.ti.com/cfs-file.ashx/__key/communityserv... http://e2e.ti.com/cfs-file.ashx/__key/communityserver-discussions-components-files/166/0552.delme.png View on e2e.ti.com http://e2e.ti.com/cfs-file.ashx/__key/communityserver-discussions-components-files/166/0552.delme.png Preview by Yahoo