Diff

clix.lua @ 38:eb9f706324c7

clix.lua: Correctly remove handled args
author Florian Zeitz <florob@babelmonkeys.de>
date Tue, 06 Jul 2010 17:02:40 +0200
parent 37:bb7a51aca282
child 40:c74380af7075
line wrap: on
line diff
--- 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