Files
neovim/test/functional/core
tao 13b2b14275 fix(path): prevent infinite loop when re-editing file without drive-letter
Problem:
Edit a file with a drive-letter path, then re-edit it without the drive letter
and colon. This cause `path_fnamencmp` to loop infinitely as `len` never
reaches 0, while `c1` and `c2` are already NUL.

Commit e18a578 accidentally used || before `(p_fic`, commit 4bcee96 fixed that,
but also moved the NUL check into a grouped condition. The bug remained hidden
because there weren't any cases where strings had different lengths and c1 and
c2 could both reach NUL. `c:/foo` vs `/foo` happens to be such a case, which is
why the infinite loop finally showed up.

Solution:
Break the loop when either `c1` or `c2` is NUL.
2026-06-02 18:59:13 -04:00
..
2025-04-27 13:40:46 -07:00
2026-04-22 18:25:07 -04:00