Skip to content

newString(len) has off-by-one error #6991

@luked99

Description

@luked99

I think newString() might have an off-by-one error.

var s = newString(0)
s[0] = 'a'   # this works fine!
s[1] = 'b'   # this fails as you might expect

And so-on for larger values. I'm not sure to what extent this is a bug, or by design.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions