aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/tools/patch.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/luarocks/tools/patch.lua b/src/luarocks/tools/patch.lua
index cc5293d3..6f36d713 100644
--- a/src/luarocks/tools/patch.lua
+++ b/src/luarocks/tools/patch.lua
@@ -540,7 +540,8 @@ local function write_new_file(filename, hunk)
540 local fh = io.open(filename, "wb") 540 local fh = io.open(filename, "wb")
541 if not fh then return false end 541 if not fh then return false end
542 for _, hline in ipairs(hunk.text) do 542 for _, hline in ipairs(hunk.text) do
543 if hline:sub(1,1) ~= "+" then 543 local c = hline:sub(1,1)
544 if c ~= "+" and c ~= "-" and c ~= " " then
544 return false, "malformed patch" 545 return false, "malformed patch"
545 end 546 end
546 fh:write(hline:sub(2)) 547 fh:write(hline:sub(2))