Skip to content

Function files.readBytes throw exception IndexOutOfBoundsException #4

@ortogo

Description

@ortogo

If i'm set needed count of bytes (argument length) an error occurs:

null in main
        at "readBytes": com.annimon.ownlang.modules.files.files$p@5ecddf8f

java.lang.IndexOutOfBoundsException

When argument offset setted 0, function work normally

Sample code when an error occurred:

f1 = fopen("file.bin", "rb")
array = newarray(10)
readedCount = readBytes(f1, array, 20, 4)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions