hun#2005643 tidy string functions, correctly

This commit is contained in:
Caolán McNamara 2010-04-07 14:52:15 +00:00
parent de2862a0d9
commit e99c1c3297
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ char * mystrdup(const char * s)
{
char * d = NULL;
if (s) {
int sl = strlen(s+1);
int sl = strlen(s)+1;
d = (char *) malloc(sl);
if (d) memcpy(d,s,sl);
}