I just stumbled upon this while coding, and felt that a few of you may benefit from recalling this.
StrLen returns the number of characters in a string, NOT counting the terminal null char.
So, when allocating memory for a string’s copy, doing it like this is wrong:
//WRONG!!!!!!!!!!!!!!!!!
foo=MemPtrNew(StrLen(string));
//DO NOT USE
The correct form is:
foo=MemPtrNew(StrLen(string) + 1);
Anyone feels like becoming a C-Hater now?
Related posts:

It does this for a reason.
The on the end of the string is used to terminate it, it isn’t part of the string. If you did a strcpy you wouldn’t want it to copy the terminator as well.
strlen() does exactly what it says it should, returns the length of the string!!
Seriously, that’s basic knowledge. If you need recalling, you need to start reading a beginner’s C book.