mirror of
https://github.com/hbomb79/Titanium.git
synced 2025-01-23 01:42:07 -05:00
Fixed bug when last line of file was missing if using readLine
This commit is contained in:
parent
cb4cacd37b
commit
abbf7085b0
1 changed files with 2 additions and 2 deletions
|
@ -491,9 +491,9 @@ function VFS.open( path, mode )
|
|||
handle.readLine = function()
|
||||
if #content == 0 then return end
|
||||
|
||||
local line, rest = content:match "^([^\n\r]*)[\n\r](.*)$"
|
||||
local line, rest = content:match "^([^\n\r]*)(.*)$"
|
||||
|
||||
content = rest or ""
|
||||
content = rest and rest:gsub("^[\n\r]", "") or ""
|
||||
return line or content
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue