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 Uninitialized State Variable #1100

Closed
wants to merge 1 commit into from
Closed

Fix Uninitialized State Variable #1100

wants to merge 1 commit into from

Conversation

duane-r
Copy link
Contributor

@duane-r duane-r commented May 20, 2016

This can crash the game if the metadata is not there. (Yes, it should be there, but there's no excuse for a crash.) State needs a sane (numeric) default regardless of what the metadata says.

@sofar
Copy link
Contributor

sofar commented May 20, 2016

This will break all left-hinged doors placed by schematics and make them right-hinged.

Did you want to just add

else
        state = 0

perhaps?

@duane-r
Copy link
Contributor Author

duane-r commented May 21, 2016

I'm happy with anything that keeps it from crashing.

@sofar
Copy link
Contributor

sofar commented May 21, 2016

Well, either you can change your commit, or I can submit a fix myself. Your choice :)

@sofar
Copy link
Contributor

sofar commented May 21, 2016

Thanks :)

@paramat
Copy link
Contributor

paramat commented May 23, 2016

👍 Can be merged as trivial.

@paramat
Copy link
Contributor

paramat commented May 23, 2016

7681682

@paramat paramat closed this May 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants