mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-16 18:55:03 -04:00
Make edit strip '\r's from line endings when opening files to avoid the '?'s. See #269.
This commit is contained in:
parent
9eb445b4aa
commit
70964e0e32
@ -345,6 +345,9 @@ do
|
||||
local w, h = getSize()
|
||||
local chars = 0
|
||||
for line in f:lines() do
|
||||
if line:sub(-1) == "\r" then
|
||||
line = line:sub(1, -2)
|
||||
end
|
||||
table.insert(buffer, line)
|
||||
chars = chars + unicode.len(line)
|
||||
if #buffer <= h then
|
||||
|
Loading…
x
Reference in New Issue
Block a user