summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--plop.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/plop.c b/plop.c
index 1485aa7..1dff60f 100644
--- a/plop.c
+++ b/plop.c
@@ -166,14 +166,14 @@ int main(int argc, char ** argv)
lua_State * L = luaL_newstate();
luaL_openlibs(L);
- if (LUA_OK != luaL_dofile(L, "default.lua"))
+ if (3 != argc)
{
- return 2; // TODO: Document error codes/print usage information
+ return 1; // TODO: Document error codes/print usage information
}
- if (2 != argc)
+ if (LUA_OK != luaL_dofile(L, argv[2]))
{
- return 1; // TODO: Document error codes/print usage information
+ return 2; // TODO: Document error codes/print usage information
}
static const int max_clients = 200;