-
Notifications
You must be signed in to change notification settings - Fork 328
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
Panic in line-numbers-0.3.0/src/lib.rs:105:13 #755
Comments
I ran into this issue as well, here is a simplified test case that can reproducibly toggle this bug with a line break. > echo -en "abc" > test1.txt
> echo -en "abc\nabc" > test2.txt
> difft test1.txt test2.txt
thread 'main' panicked at /private/tmp/nix-build-difftastic-0.60.0.drv-0/cargo-vendor-dir/line-numbers-0.3.0/src/lib.rs:105:13:
Offset 8 is out of bounds for a string of length 7
> echo -en "\n" >> test2.txt
> difft test1.txt test2.txt
test2.txt --- Text
1 1 abc
. 2 abc
. 3 > difft --version
Difftastic 0.60.0 (built with rustc 1.80.1) |
Thanks for the report, and especially for the small repro. The problem is here: Lines 113 to 123 in 3c62ff3
This is an annoying problem in general, where we want |
Thanks for reporting a bug! Please include all of the following:
(1) A description of the issue. A screenshot is often helpful too.
(2) A copy of what you're diffing. If you're diffing files, include the before and after files. If you're using difftastic with a VCS repository (e.g. git), include the URL and commit hash.
panic.zip
(3) The version of difftastic you're using (see
difft --version
) and your operating system.The text was updated successfully, but these errors were encountered: