I forgot to malloc space for the NULL.

-Erik
This commit is contained in:
Eric Andersen committed 2001-03-14 18:57:54 +00:00
1 parent 40e5e7c7ea
commit ce4a586edb
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -936,7 +936,7 @@ char * strsep_space( char *string, int * index)
return NULL;
}
token = xmalloc(*index);
token = xmalloc(*index+1);
token[*index] = '\0';
strncpy(token, string, *index);
+1 -1
View File
@@ -936,7 +936,7 @@ char * strsep_space( char *string, int * index)
return NULL;
}
token = xmalloc(*index);
token = xmalloc(*index+1);
token[*index] = '\0';
strncpy(token, string, *index);
+1 -1
View File
@@ -936,7 +936,7 @@ char * strsep_space( char *string, int * index)
return NULL;
}
token = xmalloc(*index);
token = xmalloc(*index+1);
token[*index] = '\0';
strncpy(token, string, *index);