aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/pproc.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/pproc.cpp b/src/pproc.cpp
index 55de6fe..eb52913 100644
--- a/src/pproc.cpp
+++ b/src/pproc.cpp
@@ -75,6 +75,8 @@ void grabParamAsData( PPROC *pproc, char *str, int *aind, int *cind )
75 break; 75 break;
76 76
77 case PPROC_STRING: 77 case PPROC_STRING:
78 strcpy( (char *)(pproc->stateVar), str );
79 (*aind)++;
78 break; 80 break;
79 } 81 }
80} 82}
@@ -136,7 +138,15 @@ void processParams( int argc, char *argv[], PPROC *pproc )
136 if( pproc[k].stateVar != NULL ) 138 if( pproc[k].stateVar != NULL )
137 { 139 {
138 int tmp = 1; 140 int tmp = 1;
139 grabParamAsData( &pproc[k], argv[j], &j, &tmp ); 141 if( argv[j][2] == '\0' )
142 {
143 grabParamAsData( &pproc[k], argv[j+1], &j, &tmp );
144 }
145 else
146 {
147 j--;
148 grabParamAsData( &pproc[k], (&argv[j+1][2]), &j, &tmp );
149 }
140 } 150 }
141 break; 151 break;
142 } 152 }