From 56893e9dcd1eeebffb42b227a2151e18d49bc370 Mon Sep 17 00:00:00 2001 From: Gerardo Marset Date: Mon, 25 Feb 2013 20:28:28 -0200 Subject: Use the length operator (#) instead of table.getn. table.getn was deprecated in Lua 5.1 in favor of #, the length operator. See: http://www.lua.org/manual/5.1/manual.html#7.2 --- etc/forward.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'etc/forward.lua') diff --git a/etc/forward.lua b/etc/forward.lua index 9073ac4..05ced1a 100644 --- a/etc/forward.lua +++ b/etc/forward.lua @@ -3,7 +3,7 @@ local dispatch = require("dispatch") local handler = dispatch.newhandler() -- make sure the user knows how to invoke us -if table.getn(arg) < 1 then +if #arg < 1 then print("Usage") print(" lua forward.lua ...") os.exit(1) -- cgit v1.2.3-55-g6feb