First implementation was doing: - strdup (without checking result!) - strlen - terminate - realloc New one does: - malloc to shortest +1 - strncpy - terminate
char* __fastcall__ strndup (const char* S, size_t maxlen);