Commit 1becf53c authored by allens's avatar allens

Changed logic for OS X which has no strndup

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@21669 18c085ea-50e0-402c-830e-de6fd14e8384
parent efd06694
......@@ -202,7 +202,11 @@ static char **GetStringListFromExodusIINCvar(int exfid, char const *var_name)
char *p;
retval = (char**) malloc((nstrings + 1) * sizeof(char*));
for (i = 0, p = buf; i < nstrings; i++, p += len_string)
retval[i] = strndup(p,len_string);
{
// retval[i] = strndup(p,len_string);
retval[i] = (char*) malloc((len_string + 1) * sizeof(char));
strncpy( retval[i], p, len_string );
}
retval[i] = 0;
free(buf);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment