mirror of
https://github.com/Orc/discount.git
synced 2026-09-25 04:10:00 +03:00
Make the horrible inline options parsing for mkd2html a teeny bit more
robust by not bothering to look for options unless there are at least two arguments left in argv[]
This commit is contained in:
+5
-1
@@ -81,7 +81,11 @@ char **argv;
|
||||
CREATE(footers);
|
||||
pgm = basename(argv[0]);
|
||||
|
||||
while ( argc > 1 ) {
|
||||
/* the only options we have for this program are -name value pairs,
|
||||
* so don't even bother parsing them if there aren't still a couple
|
||||
* of arguments waiting on the line.
|
||||
*/
|
||||
while ( argc > 2 ) {
|
||||
if ( strcmp(argv[1], "-css") == 0 ) {
|
||||
EXPAND(css) = argv[2];
|
||||
argc -= 2;
|
||||
|
||||
Reference in New Issue
Block a user