Skip to content

Ticket #5103: fix parse-mode error format mismatch in viewer#5105

Merged
zyv merged 1 commit intoMidnightCommander:masterfrom
azazar:master
Apr 27, 2026
Merged

Ticket #5103: fix parse-mode error format mismatch in viewer#5105
zyv merged 1 commit intoMidnightCommander:masterfrom
azazar:master

Conversation

@azazar
Copy link
Copy Markdown

@azazar azazar commented Apr 27, 2026

This fixes a segfault in viewer parse-mode error handling.

  • Root cause: format string expected two %s arguments, but only one was passed.

Fixes #5103.
Relates to #5058.

Copilot AI review requested due to automatic review settings April 27, 2026 10:21
@github-actions github-actions Bot added needs triage Needs triage by maintainers prio: medium Has the potential to affect progress labels Apr 27, 2026
@github-actions github-actions Bot added this to the Future Releases milestone Apr 27, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a crash in the internal viewer’s parse-mode error handling by aligning the error format string with how mcview_show_error() delegates to file_error_message() (single filename argument).

Changes:

  • Update the parse-mode “Cannot open …” error message to use a single %s placeholder, matching the single filename argument passed through file_error_message().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@zyv zyv added area: mcview mcview, the built-in text editor and removed needs triage Needs triage by maintainers labels Apr 27, 2026
@zyv zyv modified the milestones: Future Releases, 4.9.0 Apr 27, 2026
@zyv zyv changed the title viewer: fix parse-mode error format mismatch (Fixes #5103) Ticket #5103: fix parse-mode error format mismatch in viewer Apr 27, 2026
Copy link
Copy Markdown
Member

@zyv zyv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for finding the root cause 👍

@zyv zyv requested review from aborodin and mc-worker and removed request for aborodin April 27, 2026 11:17
@azazar azazar force-pushed the master branch 3 times, most recently from 64e868c to f7ff591 Compare April 27, 2026 13:21
@zyv
Copy link
Copy Markdown
Member

zyv commented Apr 27, 2026

Please remove unrelated commit from this PR.

Fixes MidnightCommander#5103

Signed-off-by: Mikhail Yevchenko <spam@uo1.net>
@azazar
Copy link
Copy Markdown
Author

azazar commented Apr 27, 2026

I'm sorry for that mess.

@zyv zyv merged commit 5171db8 into MidnightCommander:master Apr 27, 2026
10 checks passed
@zyv
Copy link
Copy Markdown
Member

zyv commented Apr 27, 2026

Thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: mcview mcview, the built-in text editor prio: medium Has the potential to affect progress

Development

Successfully merging this pull request may close these issues.

Format mismatch causing segfault

4 participants