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

Modernize SaveCurrentGame() in file.c & ./include/file.h #31

Open
de01dwc opened this issue Oct 1, 2024 · 0 comments
Open

Modernize SaveCurrentGame() in file.c & ./include/file.h #31

de01dwc opened this issue Oct 1, 2024 · 0 comments

Comments

@de01dwc
Copy link
Contributor

de01dwc commented Oct 1, 2024

  • replace sprintf() calls with snprintf()
  • when construction save file, move the saveFile assignment to its own line for readability, then check for NULL
  • remove unnecessary cast in first param of fwrite()
  • update fclose() to check for EOF or != 0 instead of < 0
  • update if(SaveLevelDataFile() == TRUE) to if(SaveLevelDataFile())
  • when setting Current Message to Game Saved, keep expression to one line
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

No branches or pull requests

1 participant