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

Avoid uninitialized resistance values #37417

Merged
merged 1 commit into from
Jan 26, 2020

Conversation

jbytheway
Copy link
Contributor

Summary

SUMMARY: None

Purpose of change

The resistances constructor for monsters left the DT_ELECTRIC value uninitialized. This led to inconsistent behaviour and CI test failures.

Describe the solution

Ensure it's initialized by delegating to the default constructor.

Testing

I found a particular seed which reproduced this issue as seen in the GitHub workflow tests. Failed before the change and not after.

Additional context

Problem has been plaguing CI recently. See e.g. this run.

The resistances constructor for monsters left the DT_ELECTRIC value
uninitialized.  This led to inconsistent behaviour and CI test failures.

Ensure it's initialized.
@ZhilkinSerg ZhilkinSerg added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Code: Tests Measurement, self-control, statistics, balancing. labels Jan 26, 2020
@ZhilkinSerg ZhilkinSerg merged commit 88c370c into CleverRaven:master Jan 26, 2020
@jbytheway jbytheway deleted the uninitialized-resistances branch January 27, 2020 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Code: Tests Measurement, self-control, statistics, balancing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants