Skip to content
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

Comparing two completely different files is going to panic #739

Closed
eatradish opened this issue Jul 22, 2024 · 0 comments
Closed

Comparing two completely different files is going to panic #739

eatradish opened this issue Jul 22, 2024 · 0 comments

Comments

@eatradish
Copy link

File1:

--2024-04-04 21:40:06--  https://wps-linux-personal.wpscdn.cn/wps/download/ep/Linux2019/11719/wps-office_11.1.0.11719_amd64.deb?t=1712237894
正在解析主机 wps-linux-personal.wpscdn.cn (wps-linux-personal.wpscdn.cn)... 123.6.109.2
正在连接 wps-linux-personal.wpscdn.cn (wps-linux-personal.wpscdn.cn)|123.6.109.2|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 403 Forbidden
2024-04-04 21:40:06 错误 403:Forbidden。

File2:
https://pastebin.aosc.io/paste/Y4sF8AVTmS-YxaPoMNIn-g/raw

Will get:

saki@Daylily [ ~ ] $ difft yarn.lock wget-log 
wget-log --- Text
  1 # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.                           1 --2024-04-04 21:40:06--  https://wps-linux-personal.wpscdn.cn/wps/download/ep/Linux2019/11
  .                                                                                            . 719/wps-office_11.1.0.11719_amd64.deb?t=1712237894
  .                                                                                            2 正在解析主机 wps-linux-personal.wpscdn.cn (wps-linux-personal.wpscdn.cn)... 123.6.109.2
  .                                                                                            3 正在连接 wps-linux-personal.wpscdn.cn (wps-linux-personal.wpscdn.cn)|123.6.109.2|:443... 
  .                                                                                            . 已连接。
  .                                                                                            4 已发出 HTTP 请求,正在等待回应... 403 Forbidden
  2 # yarn lockfile v1                                                                         5 2024-04-04 21:40:06 错误 403:Forbidden。
  3                                                                                            6 
thread 'main' panicked at src/display/side_by_side.rs:538:34:
index out of bounds: the len is 6 but the index is 6
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

difft --version :

saki@Daylily [ ~ ] ! difft --version
Difftastic 0.59.0 (built with rustc 1.79.0)
yuja added a commit to yuja/difftastic that referenced this issue Jul 22, 2024
myers_diff doesn't emit the last blank line, so I made the fall-back path do
the same.

This was originally intended to fix Wilfred#702, but fixes crash with
sample_files/big_text_hunk_?.txt on 0.59.0. It probably fixes Wilfred#739.
yuja added a commit to yuja/difftastic that referenced this issue Jul 24, 2024
myers_diff doesn't emit the last blank line, so I made the fall-back path do
the same.

This was originally intended to fix Wilfred#702, but fixes crash with
sample_files/big_text_hunk_?.txt on 0.59.0. It probably fixes Wilfred#739.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant