fix: Correct critical bugs and improve code quality#717
Open
gambinoxxx wants to merge 1 commit intoacmbvp:masterfrom
Open
fix: Correct critical bugs and improve code quality#717gambinoxxx wants to merge 1 commit intoacmbvp:masterfrom
gambinoxxx wants to merge 1 commit intoacmbvp:masterfrom
Conversation
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit addresses several critical bugs and improves the overall code quality in various game implementations within the repository.
C++ Hangman Game (Hangman.cpp):
JavaScript Dodgeball Game (loginregister.html):
JavaScript ConnectFour Game (registration.js):
These changes ensure the applications run more reliably and adhere to better coding and security practices.