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

Crash fix when starting up Doom Classic; sprnames list must be NULL-terminated #1

Merged
merged 1 commit into from Nov 27, 2012

Conversation

@JamesDunne
Copy link
Contributor

JamesDunne commented Nov 27, 2012

Fixes a reproducible crash when built with VS2012 Premium in Debug and Retail builds.

BrianHarris pushed a commit that referenced this pull request Nov 27, 2012
Crash fix when starting up Doom Classic; sprnames list must be NULL-terminated
@BrianHarris BrianHarris merged commit be311f4 into id-Software:master Nov 27, 2012
DanielGibson pushed a commit to DanielGibson/DOOM-3-BFG that referenced this pull request Dec 1, 2012
Use static runtime, remove 2 annoying assertions
@revelator

This comment has been minimized.

Copy link

revelator commented on 2edcf7d Dec 2, 2012

Can change the (const char * const)NULL to '\0' works just as well and no need for a cast :)

This comment has been minimized.

Copy link
Contributor Author

JamesDunne replied Dec 2, 2012

No I don't think it would, but stranger things have been known to happen. The code is searching for a NULL pointer value to terminate the list, not a pointer to a string containing a 0 character.

This comment has been minimized.

Copy link

revelator replied Dec 2, 2012

Im not sure why but it works fine though it may not be 100% correct.
Though a lot of compilers treat '\0' the same way as a const integral 0 atleast according to many discussions on the matter.

Compilers are indeed strange ;)

@JamesDunne
Copy link
Contributor Author

JamesDunne commented Dec 2, 2012

Oh I see what you're saying, the '\0' character, not a "\0" string. Then yeah, that would work.

CarlKenner pushed a commit to CarlKenner/DOOM-3-BFG that referenced this pull request Dec 28, 2016
CarlKenner added a commit to CarlKenner/DOOM-3-BFG that referenced this pull request Dec 31, 2016
Fix Doom 3 BFG's broken Doom 2 MAP33 Betray.
CarlKenner pushed a commit to CarlKenner/DOOM-3-BFG that referenced this pull request Jan 1, 2017
Make video discs 1/4 the normal size, & touch the desk, to look realistic in VR
CarlKenner pushed a commit to CarlKenner/DOOM-3-BFG that referenced this pull request Jul 10, 2018
Keep up with new changes in main repository
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.