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

Cfile enhance #358

Merged
merged 5 commits into from
May 17, 2024
Merged

Cfile enhance #358

merged 5 commits into from
May 17, 2024

Conversation

winterheart
Copy link
Collaborator

Pull Request Type

  • GitHub Workflow changes
  • Documentation or Wiki changes
  • Build and Dependency changes
  • Runtime changes
    • Render changes
    • Audio changes
    • Input changes
    • Network changes
    • Other changes

Description

General cleanup of CFILE library, use smart pointers instead of raw ones. Fixes issue on reading broken files (i.e. broken savegames, see #351).

Related Issues

Fixes #351.

Screenshots (if applicable)

Checklist

  • I have tested my changes locally and verified that they work as intended.
  • I have documented any new or modified functionality.
  • I have reviewed the changes to ensure they do not introduce any unnecessary complexity or duplicate code.
  • I understand that by submitting this pull request, I am agreeing to license my contributions under the project's license.

Additional Comments

Remove unused cf_ReadHogFileEntry() function.
All functions, that uses cf_ReadBytes(), checks return size, but don't handle potential exceptions. That leads to segfaults on reading of damaged files (i.e. broken savegames).
Copy link
Collaborator

@JeodC JeodC left a comment

Choose a reason for hiding this comment

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

Works perfectly on windows.

Screenshot001

@JeodC JeodC requested a review from Lgt2x May 17, 2024 15:42
@JeodC JeodC merged commit 56e6127 into DescentDevelopers:main May 17, 2024
10 checks passed
@winterheart winterheart deleted the cfile-enhance branch May 27, 2024 21:57
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.

[Runtime Issue]: Incomplete save files will crash the 'load game' menu
2 participants