--- ray/src/util/rfluxmtx.c 2014/08/06 02:38:24 2.14 +++ ray/src/util/rfluxmtx.c 2014/08/15 19:59:56 2.15 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rfluxmtx.c,v 2.14 2014/08/06 02:38:24 greg Exp $"; +static const char RCSid[] = "$Id: rfluxmtx.c,v 2.15 2014/08/15 19:59:56 greg Exp $"; #endif /* * Calculate flux transfer matrix or matrices using rcontrib @@ -319,7 +319,7 @@ parse_params(PARAMS *p, char *pargs) int nparams = 0; int i; - for ( ; ; ) + for ( ; ; ) { switch (*cp++) { case 'h': if (*cp++ != '=') @@ -342,6 +342,8 @@ parse_params(PARAMS *p, char *pargs) break; if (!get_direction(p->vup, cp)) break; + while (*cp && !isspace(*cp++)) + ; ++nparams; continue; case 'o': @@ -360,14 +362,16 @@ parse_params(PARAMS *p, char *pargs) case ' ': case '\t': case '\r': - case '\n': continue; + case '\n': case '\0': return(nparams); default: break; } - fprintf(stderr, "%s: bad parameter string '%s'\n", progname, pargs); + break; + } + fprintf(stderr, "%s: bad parameter string: %s", progname, pargs); exit(1); return(-1); /* pro forma return */ }