Correct test for missing required arguments (ie. the server address) - thanks albert!

Sun, 06 Jun 2010 17:49:46 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Sun, 06 Jun 2010 17:49:46 +0100
changeset 6
69af027ed4b8
parent 5
05ee9f5fcefc
child 7
015150645930

Correct test for missing required arguments (ie. the server address) - thanks albert!

xmpp-fingerprint.lua file | annotate | diff | comparison | revisions
--- a/xmpp-fingerprint.lua	Sat May 08 19:29:23 2010 +0100
+++ b/xmpp-fingerprint.lua	Sun Jun 06 17:49:46 2010 +0100
@@ -77,7 +77,7 @@
 	os.exit(1);
 end
 
-if not server then
+if #arg < 1 then
 	io.stderr:write("ERROR: No server address specified.\n");
 	os.exit(1);
 end

mercurial