Skip to content

viewer: fix parse-mode error format mismatch (Fixes #5103)#5104

Closed
azazar wants to merge 1 commit into
MidnightCommander:masterfrom
azazar:master
Closed

viewer: fix parse-mode error format mismatch (Fixes #5103)#5104
azazar wants to merge 1 commit into
MidnightCommander: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.

Fix: in mcviewer.c, change the parse-mode error format to a single %s so it matches file_error_message() usage.

Regression introduced by d69da19 (mcviewer: use file_error_message()).

Fixes #5103.

Copilot AI review requested due to automatic review settings April 27, 2026 10:14
@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 viewer’s “parse mode” error path by correcting a printf-style format string to match how errors are rendered via file_error_message().

Changes:

  • Adjusted the parse-mode “Cannot open…” error format string to use a single %s placeholder, matching the single filename argument provided.

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

@azazar
Copy link
Copy Markdown
Author

azazar commented Apr 27, 2026

LLM messed up commit metadata, I'll resubmit it.

@azazar azazar closed this Apr 27, 2026
@github-actions github-actions Bot removed this from the Future Releases milestone Apr 27, 2026
@zyv
Copy link
Copy Markdown
Member

zyv commented Apr 27, 2026

Superseded by #5105.

@zyv zyv added area: mcview mcview, the built-in text editor and removed needs triage Needs triage by maintainers labels Apr 27, 2026
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

3 participants