[SOLVED] love.filesystem.read only reads Text?
Posted: Wed Oct 04, 2023 12:44 am
Hey everyone,
I don't have any code snippets to share as I'm very early in my project and I'm curious about a function that seems to return data, but only to a certain point:
love.filesystem.read() returns data from a file, cool.
I use it to try to read data from a MOD (Tracker) file.
I need it to find an "M" at 1080 offset (438h) which is there in my test file.
When I tell it to print data up to 1084 or seek to 1080 and read 4 bytes all I ever get back is everything up to the first 0 (0x00) byte in the file.
Nothing else comes out. Even if I seek PAST that point or ask for something that is a UTF-8 encoded byte or ask for EVERYTHING up to 1084.
So is this a limitation of love.filesystem.read() or am I using it incorrectly?
Again, no code to show. Just read a file and output what it reads and that's all I get; title of the song. Nothing else.
Any insight would be appreciated.
I don't have any code snippets to share as I'm very early in my project and I'm curious about a function that seems to return data, but only to a certain point:
love.filesystem.read() returns data from a file, cool.
I use it to try to read data from a MOD (Tracker) file.
I need it to find an "M" at 1080 offset (438h) which is there in my test file.
When I tell it to print data up to 1084 or seek to 1080 and read 4 bytes all I ever get back is everything up to the first 0 (0x00) byte in the file.
Nothing else comes out. Even if I seek PAST that point or ask for something that is a UTF-8 encoded byte or ask for EVERYTHING up to 1084.
So is this a limitation of love.filesystem.read() or am I using it incorrectly?
Again, no code to show. Just read a file and output what it reads and that's all I get; title of the song. Nothing else.
Any insight would be appreciated.