From ac98da8eacbf1147d69e378db62432db05e8c73e Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 28 Jun 2006 11:43:49 +0000 Subject: Minor fixes to the command line processor. --- src/pproc.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 ) break; case PPROC_STRING: + strcpy( (char *)(pproc->stateVar), str ); + (*aind)++; break; } } @@ -136,7 +138,15 @@ void processParams( int argc, char *argv[], PPROC *pproc ) if( pproc[k].stateVar != NULL ) { int tmp = 1; - grabParamAsData( &pproc[k], argv[j], &j, &tmp ); + if( argv[j][2] == '\0' ) + { + grabParamAsData( &pproc[k], argv[j+1], &j, &tmp ); + } + else + { + j--; + grabParamAsData( &pproc[k], (&argv[j+1][2]), &j, &tmp ); + } } break; } -- cgit v1.2.3