Skip to content

Conversation

@gambinoxxx
Copy link

This commit addresses several critical bugs and improves the overall code quality in various game implementations within the repository.

  • C++ Hangman Game (Hangman.cpp):

    • Resolved a critical buffer overflow that caused crashes by correctly sizing std::string variables before use.
    • Replaced unsafe C-style string loops with modern C++ std::string::length() checks for better safety and clarity.
    • Substituted the non-portable system("clear") with a cross-platform alternative for screen clearing.
  • JavaScript Dodgeball Game (loginregister.html):

    • Fixed a bug where login and registration forms used duplicate HTML id's, causing incorrect element selection in JavaScript.
    • Added a security warning regarding the insecure practice of storing passwords in localStorage.
  • JavaScript ConnectFour Game (registration.js):

    • Completed the showRankingsTable function, which was missing the logic to generate and display the rankings table from localStorage data.

These changes ensure the applications run more reliably and adhere to better coding and security practices.

This commit addresses several critical bugs and improves the overall code quality in various game implementations within the repository.

- C++ Hangman Game (Hangman.cpp):
  - Resolved a critical buffer overflow that caused crashes by correctly sizing std::string variables before use.
  - Replaced unsafe C-style string loops with modern C++ std::string::length() checks for better safety and clarity.
  - Substituted the non-portable system("clear") with a cross-platform alternative for screen clearing.

- JavaScript Dodgeball Game (loginregister.html):
  - Fixed a bug where login and registration forms used duplicate HTML id's, causing incorrect element selection in JavaScript.
  - Added a security warning regarding the insecure practice of storing passwords in localStorage.

- JavaScript ConnectFour Game (registration.js):
  - Completed the showRankingsTable function, which was missing the logic to generate and display the rankings table from localStorage data.

These changes ensure the applications run more reliably and adhere to better coding and security practices.
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.

1 participant