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 debug commands for release builds #1472

Open
ghost opened this issue Aug 31, 2019 · 2 comments
Open

Fix debug commands for release builds #1472

ghost opened this issue Aug 31, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented Aug 31, 2019

Throughout the code you will see stuff like:

#ifdef _DEBUG
if ( godmode || p == pnum)
#else 
if ( p == pnum)

There's no way they wrote the code like this. Given that all of the affected debug flags are not present in the release build's memory, it implies they did the following:

#ifdef _DEBUG
int godmode = TRUE;
#else 
#define godmode 0
@sskras
Copy link
Contributor

sskras commented Nov 10, 2019

By writing int godmode = TRUE; do you mean it is present as a var somewhere in the binary and not as an inline const a-la #define godmode 1 ?

@ghost
Copy link
Author

ghost commented Nov 10, 2019

Correct. The data section of these flags does not exist in release builds, which strongly implies they kept them as a define for release builds that always equate false.

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