frame-codebase
frame-codebase copied to clipboard
BUG: file:read(*num_bytes) does not respect limit of num_bytes
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