Merge pull request #62 from timku/patch-1
Update xkcd.lua fixed issue with random xkcd.
This commit is contained in:
commit
65313e24a4
@ -20,7 +20,7 @@ end
|
||||
function get_xkcd_random()
|
||||
local last = get_last_id()
|
||||
math.randomseed(os.time())
|
||||
i = math.random(1, data.num)
|
||||
i = math.random(1, last)
|
||||
return get_xkcd(i)
|
||||
end
|
||||
|
||||
@ -51,4 +51,4 @@ return {
|
||||
"xkcd.com/(%d+)"
|
||||
},
|
||||
run = run
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user