mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
Prevent error in File:lines if the last line does not end with a newline (resolves #1383)
This commit is contained in:
@@ -324,7 +324,7 @@ int w_File_lines_i(lua_State *L)
|
||||
end = reinterpret_cast<const char*>(memchr(start, '\n', len));
|
||||
}
|
||||
|
||||
if (!end && file->isEOF())
|
||||
if (!end)
|
||||
end = buffer+len-1;
|
||||
|
||||
// We've found the next line, update our offset upvalue and return
|
||||
|
||||
Reference in New Issue
Block a user