Fix for typo in strndup() function definition.

This commit is contained in:
Chandra Penke 2011-01-17 09:03:34 -02:00 committed by Marcelo Roberto Jimenez
parent abfa841318
commit f46683fd0e

View File

@ -48,7 +48,7 @@
size_t strsize = strnlen(__string, __n);
char *newstr = (char *)malloc(strsize + 1);
strncpy(newstr, __string, newstr);
strncpy(newstr, __string, strsize);
newstr[strsize] = 0;
return newstr;