We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6f803a5 commit 1765627Copy full SHA for 1765627
1 file changed
xtra/PATCH.LUA
@@ -14,7 +14,7 @@ local function patch(pf)
14
o,e=io.open(f,"w")if not o then return abort()end
15
b,e=io.open(f..".orig")if not b then return abort()end
16
if of then of:close()end if bf then bf:close()end of,ol,bf,bl,h=o,0,b,0,nil return true end
17
- local function writeRemainder()if h then if h.o.l~=bl-(h.o.s-1)or h.n.l~=ol-(h.n.s-1)then print(M)os.exit(1)else print("patched")end end
+ local function writeRemainder()if h then if(h.o.l>0 and h.o.s>0)and(h.o.l~=bl-(h.o.s-1)or h.n.l~=ol-(h.n.s-1))then print(M)os.exit(1)else print("patched")end end
18
if of then local rest=bf:read("*l")while rest do of:write(rest..'\n')rest=bf:read("*l")end of:close()of,ol=nil,0 end bf:close()bf,bl,h=nil,0,nil end
19
local n=pf:read("*l")while n do
20
local l,ls=n n=pf:read("*l")ls=l:sub(1,1)
0 commit comments