Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/sys.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoumith Chintala <soumith@gmail.com>2016-09-20 18:12:08 +0300
committerGitHub <noreply@github.com>2016-09-20 18:12:08 +0300
commit512e61a3e23fa3fd5bf84f09f380131552c2fff2 (patch)
tree061cd9376344f5a7ddef66e611414e00b4176063
parentd9803f4ac1dc39f24d7abcb9a70183f7fa48fabc (diff)
parentf70da680e64f605fdb34112f542a82c4bec7648f (diff)
Merge pull request #15 from nagadomi/fix_find_prefix
Fix type error in find_prefix
-rw-r--r--init.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index 6196fe8..75f1722 100644
--- a/init.lua
+++ b/init.lua
@@ -96,7 +96,7 @@ sys.lla = function(d) d = d or ' ' return execute('ls -la '..d) end
local function find_prefix()
if arg then
for i, v in pairs(arg) do
- if i <= 0 then
+ if type(i) == "number" and type(v) == "string" and i <= 0 then
local lua_path = paths.basename(v)
if lua_path == "luajit" or lua_path == "lua" then
local bin_dir = paths.dirname(v)