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

fix: Remove instances of undefined behavior #1652

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from
Draft

fix: Remove instances of undefined behavior #1652

wants to merge 20 commits into from

Conversation

jadebenn
Copy link
Collaborator

Hooked up the sanitizer to try and track down any UB in our codebase

@EmosewaMC
Copy link
Collaborator

make sure to check foot races in AG show the correct times at game end 👍

CMakeLists.txt Outdated Show resolved Hide resolved
@@ -146,7 +146,7 @@ void WriteSd0Magic(char* input, uint32_t chunkSize) {
input[2] = '0';
input[3] = 0x01;
input[4] = 0xFF;
*reinterpret_cast<uint32_t*>(input + 5) = chunkSize; // Write the integer to the character array
std::memcpy(&input[5], &chunkSize, sizeof(uint32_t)); // Write the integer to the character array
Copy link
Collaborator

Choose a reason for hiding this comment

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

this one is a bit harder to test, but ill send you a test case for it

@@ -54,6 +54,7 @@ struct AssetStream : std::istream {
}

operator bool() {
// NEED TO FIX THIS
Copy link
Collaborator

Choose a reason for hiding this comment

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

if this is changed make sure to check files existing and not existing with both packed and unpacked clients

@jadebenn
Copy link
Collaborator Author

jadebenn commented Nov 26, 2024

make sure to check foot races in AG show the correct times at game end 👍

Tested it, and it looks good. Still need to address a few other things.

@jadebenn jadebenn mentioned this pull request Nov 27, 2024
2 tasks
@jadebenn jadebenn self-assigned this Dec 20, 2024
@jadebenn jadebenn added the A-common Related to dCommon label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-common Related to dCommon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants