3 ms·
The string: [This ] The len: 5 Doesn't it bother you that your 5 character long buffer that is supposed to be terminated by a null happens to have 5 characters
by Aloisius 14y ago
The string: [This ] The len: 5
Doesn't it bother you that your 5 character long buffer that is supposed to be terminated by a null happens to have 5 characters in it "[This ]" instead of 4 visible "[This]"?
Your memory just happens to have a null 6 bytes after the pointer.
- dibbit 14y agoRun the code and see for yourself, parent fixed it.