From d121afeeab6c7a52ae0964f5dc66cc6a3d8cf3ca Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 29 Jun 2006 07:02:28 +0000 Subject: Fixed a bug that would cause certain peramiters that were after parameters that had a variable but no proc set would be processed twice. --- src/paramproc.cpp | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/paramproc.cpp b/src/paramproc.cpp index 85274e2..8317823 100644 --- a/src/paramproc.cpp +++ b/src/paramproc.cpp @@ -269,10 +269,12 @@ void ParamProc::process( int argc, char *argv[] ) argc-arg-1, argv+arg+1 ); if( ret > add ) - arg += ret; + add = 0; else - arg += add; + add -= ret; + arg += ret; } + arg += add; } continue; } @@ -316,13 +318,12 @@ void ParamProc::process( int argc, char *argv[] ) delete tmp; break; } - if( bUsed ) - { - delete tmp; - break; - } delete tmp; } + if( bUsed ) + { + break; + } } else { @@ -349,11 +350,11 @@ void ParamProc::process( int argc, char *argv[] ) arg += ret; break; } - if( bUsed ) - { - arg++; - break; - } + } + if( bUsed ) + { + arg++; + break; } } } -- cgit v1.2.3