Index: /issm/trunk-jpl/src/wrappers/matlab/io/FetchMatlabData.cpp
===================================================================
--- /issm/trunk-jpl/src/wrappers/matlab/io/FetchMatlabData.cpp	(revision 22366)
+++ /issm/trunk-jpl/src/wrappers/matlab/io/FetchMatlabData.cpp	(revision 22367)
@@ -846,8 +846,6 @@
 GenericOption<char*>* OptionCharParse( char* name, const mxArray* prhs[]){ /*{{{*/
 
-	GenericOption<char*>  *ochar = NULL;
-
 	/*check and parse the name  */
-	ochar=new GenericOption<char*>();
+	GenericOption<char*>* ochar=new GenericOption<char*>();
 	ochar->name =xNew<char>(strlen(name)+1);
 	memcpy(ochar->name,name,(strlen(name)+1)*sizeof(char));
@@ -857,5 +855,11 @@
 		_error_("Value of option \"" << ochar->name  << "\" must be class \"char\", not class \"" << mxGetClassName(prhs[0]) <<"\".");
 	}
-	FetchData(&ochar->value,&ochar->numel,&ochar->ndims,&ochar->size,prhs[0]);
+	//FetchData(&ochar->value,&ochar->numel,&ochar->ndims,&ochar->size,prhs[0]);
+	FetchData(&ochar->value,prhs[0]);
+	ochar->numel = strlen(name);
+	ochar->ndims = 2;
+	ochar->size = xNew<int>(2);
+	ochar->size[0] = ochar->numel;
+	ochar->size[1] = 1;
 
 	return(ochar);
