Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: file:read(*num_bytes) does not respect limit of num_bytes #234

Open
OkGoDoIt opened this issue Jul 17, 2024 · 0 comments
Open

BUG: file:read(*num_bytes) does not respect limit of num_bytes #234

OkGoDoIt opened this issue Jul 17, 2024 · 0 comments

Comments

@OkGoDoIt
Copy link

OkGoDoIt commented Jul 17, 2024

According to the documentation at https://docs.brilliant.xyz/frame/lua/#file-system, the file:read(*num_bytes) function should read at max num_bytes from the file, or until the end of a line or file. In practice, this does not seem to be the case, and it always reads to the end of the line or file regardless of the value passed to num_bytes. There may be a bug in https://github.com/brilliantlabsAR/frame-codebase/blob/main/source/application/lua_libraries/file.c#L209-L258. Alternatively the documentation may need to be updated.
cc @siliconwitch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant