aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2013-07-04 12:18:26 -0300
committerHisham Muhammad <hisham@gobolinux.org>2013-07-04 12:18:45 -0300
commit843e14b3b27312aaa27158580c9ed5ae52bbd0f2 (patch)
tree5a88ce35dc12335959b1bedca08b7d4330f0d0ff
parent2deba4b3822a13eb81b16417350de292d9868488 (diff)
downloadluarocks-843e14b3b27312aaa27158580c9ed5ae52bbd0f2.tar.gz
luarocks-843e14b3b27312aaa27158580c9ed5ae52bbd0f2.tar.bz2
luarocks-843e14b3b27312aaa27158580c9ed5ae52bbd0f2.zip
Off-by-one fix sent by Philipp Janda
-rw-r--r--src/luarocks/tools/patch.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/luarocks/tools/patch.lua b/src/luarocks/tools/patch.lua
index 04154219..baaacfc1 100644
--- a/src/luarocks/tools/patch.lua
+++ b/src/luarocks/tools/patch.lua
@@ -95,7 +95,7 @@ local function string_as_file(s)
95 eof = false, 95 eof = false,
96 read = function(self, n) 96 read = function(self, n)
97 if self.eof then return nil end 97 if self.eof then return nil end
98 local chunk = self.str:sub(self.at, self.at+n) 98 local chunk = self.str:sub(self.at, self.at + n - 1)
99 self.at = self.at + n 99 self.at = self.at + n
100 if self.at > self.len then 100 if self.at > self.len then
101 self.eof = true 101 self.eof = true