Skip to content

Commit

Permalink
Merge pull request yagop#62 from timku/patch-1
Browse files Browse the repository at this point in the history
Update xkcd.lua fixed issue with random xkcd.
  • Loading branch information
yagop committed Feb 11, 2015
2 parents 2937be7 + f7015bf commit 65313e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/xkcd.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -51,4 +51,4 @@ return {
"xkcd.com/(%d+)"
},
run = run
}
}

0 comments on commit 65313e2

Please sign in to comment.