Skip to content

subtract with overflow in new line iterator #76

@bjorn-ove

Description

@bjorn-ove

It appears there is an issue that was introduced by #70.

The issue is an subtract with overflow in

ropey/src/iter.rs

Line 1240 in 1029afa

self.total_lines - self.line_idx,

The following code reproduces the issue.

use ropey::Rope;

fn main() {
    dbg!(Rope::from_str("").lines_at(0).collect::<Vec<_>>());
}

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