jack (3.1.1+cvs20050801-29) 88_fix_argv_loop.patch

Summary

 jack_argv.py |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

    
download this patch

Patch contents

Fix an endless loop in the parsing of certain command line arguments.
Debian #336911.

--- a/jack_argv.py~	2005-11-01 19:22:23.000000000 +0000
+++ b/jack_argv.py	2005-11-01 19:25:27.000000000 +0000
@@ -61,10 +61,10 @@
     else:
         print "These are the most commom options. For a complete list, run jack --longhelp"
 
-def get_next(argv, i, extra_arg = None):
+def get_next(argv, i, extra_arg = None, allow_equal = 1):
     if extra_arg != None:
         return i, extra_arg
-    elif argv[i].find("=") > 0:
+    elif allow_equal and argv[i].find("=") > 0:
         return i, argv[i].split("=", 1)[1]
     else:
         i = i + 1
@@ -118,7 +118,7 @@
         l = []
         if origin == "argv":
             while 1:
-                i, data = get_next(argv, i, alt_arg)
+                i, data = get_next(argv, i, alt_arg, 0)
                 if data != None:
                     if data == ";":
                         break