Merged
Conversation
- Replaced most instances of `NULL` with `nullptr`. - Replaced most `shared_ptr(new ...)` with `make_shared`. - Removed the `nullptr` macro as it was interfering with the actual nullptr keyword in some instances.
…ker101/MinecraftConsoles into feat/project-modernization
Contributor
Author
2026-03-07.23-42-01.mp4 |
Collaborator
|
Tests okay for me (multiplayer, world gen, etc), merging! |
piebotc
pushed a commit
to piebotc/LegacyEvolved
that referenced
this pull request
Mar 9, 2026
* Fixed boats falling and a TP glitch smartcmd#266 * Replaced every C-style cast with C++ ones * Replaced every C-style cast with C++ ones * Fixed boats falling and a TP glitch smartcmd#266 * Updated NULL to nullptr and fixing some type issues * Modernized and fixed a few bugs - Replaced most instances of `NULL` with `nullptr`. - Replaced most `shared_ptr(new ...)` with `make_shared`. - Removed the `nullptr` macro as it was interfering with the actual nullptr keyword in some instances. * Fixing more conflicts * Replace int loops with size_t and start work on overrides * Add safety checks and fix a issue with vector going OOR
Kamenkovic
pushed a commit
to Kamenkovic/FpsLimit
that referenced
this pull request
Mar 9, 2026
* Fixed boats falling and a TP glitch smartcmd#266 * Replaced every C-style cast with C++ ones * Replaced every C-style cast with C++ ones * Fixed boats falling and a TP glitch smartcmd#266 * Updated NULL to nullptr and fixing some type issues * Modernized and fixed a few bugs - Replaced most instances of `NULL` with `nullptr`. - Replaced most `shared_ptr(new ...)` with `make_shared`. - Removed the `nullptr` macro as it was interfering with the actual nullptr keyword in some instances. * Fixing more conflicts * Replace int loops with size_t and start work on overrides * Add safety checks and fix a issue with vector going OOR
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.
Description
Adds checks to prevent
std::vectorout of range access and null pointer dereferences that causes runtime assertions which caused a crash in my last PR.Changes
Previous Behavior
Some rendering and UI code assumed pointers and vectors indices were always valid. In certain cases this cause the MSVC crash/assertion 'vector subscript out of range`.
Root Cause
size_tcould underflow when decrementing past 0.New Behavior
The code now validates indices and pointers before use, preventing invalid vector access and null dereferences.
Fix Implementation
size_Twithintto avoid unsinged underflow.AI Use Disclosure
No.
Related Issues/PR
@codeHusky Sorry about not testing it totally cross my mind while I was doing it, because I was just confident in my code which was a rookie mistake. But I tested this one and it was working just fine so if you could review this one.