added better '-' support
authorkramm <kramm>
Sun, 21 Jan 2007 21:20:09 +0000 (21:20 +0000)
committerkramm <kramm>
Sun, 21 Jan 2007 21:20:09 +0000 (21:20 +0000)
lib/args.h

index a99c138..f5f0351 100644 (file)
@@ -46,7 +46,7 @@ static void processargs(int argn2,char**argv2)
         if(t<argn2-1) next=argv2[t+1];
         else        next=0;
 
-        if(argv2[t][0]=='-')
+        if(argv2[t][0]=='-' && argv2[t][1])
         {
             if(argv2[t][1]=='-')
             {
@@ -82,10 +82,6 @@ static void processargs(int argn2,char**argv2)
                         s++;
                     } while(!ret);
                 }
-                else // - usually means "read stdout"
-                {
-                    t+=args_callback_option(&argv2[t][1],next);
-                }
             }
         }
         else