clix.lua: Correctly remove handled args

Tue, 06 Jul 2010 17:02:40 +0200

author
Florian Zeitz <florob@babelmonkeys.de>
date
Tue, 06 Jul 2010 17:02:40 +0200
changeset 38
eb9f706324c7
parent 37
bb7a51aca282
child 39
4b08296a6748

clix.lua: Correctly remove handled args

clix.lua file | annotate | diff | comparison | revisions
--- a/clix.lua	Mon Jun 07 20:19:53 2010 +0100
+++ b/clix.lua	Tue Jul 06 17:02:40 2010 +0200
@@ -130,7 +130,7 @@
 end
 
 -- Remove all the handled args from the arg array
-for n=(args_handled_up_to or #arg),1,-1 do
+for n=((args_handled_up_to > 0) and args_handled_up_to or #arg),1,-1 do
 	table.remove(arg, n);
 end
 

mercurial