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

[sfntedit] Fix bug when attempting to add non-existent file #1696

Merged
merged 4 commits into from
Sep 30, 2023

Conversation

josh-hadley
Copy link
Collaborator

Description

Modified sfntedit code to show the correct filename when non-existing file is specified for adding a table (-a mode).

Closes #1658

Checklist:

  • I have followed the Contribution Guidelines
  • I have added test code and data to prove that my code functions correctly
  • I have verified that new and existing tests pass locally with my changes
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

@josh-hadley josh-hadley changed the title [sfntedit] Fix bug when adding non-existent filename [sfntedit] Fix bug when attempting to add non-existent file Aug 31, 2023
In sfntedit/source/Efile.c, if `filename` is not found, `fyl` was passed to `fileError` with its `->name` unset, leading to wrong/garbage output error message from `fileError`. Moving the statement that sets `fyl->name` *before* the `fyl->fp == NULL` check fixes it.
Copy link
Collaborator

@skef skef left a comment

Choose a reason for hiding this comment

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

LGTM

@josh-hadley josh-hadley merged commit 67fdb12 into develop Sep 30, 2023
9 checks passed
@josh-hadley josh-hadley deleted the jh-1658 branch September 30, 2023 01:27
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 this pull request may close these issues.

[sfntedit] Wrong missing filename shown
2 participants