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

Growth rate modifier is un-initialized / has outdated value in edge case #332

Closed
dschlaep opened this issue Jul 8, 2019 · 1 comment
Closed
Assignees
Labels
bug in progress Task is currently in progress
Milestone

Comments

@dschlaep
Copy link
Member

dschlaep commented Jul 8, 2019

Function rgroup_Grow: the variable tgmod is un-initialized/has outdated value if s->temp_class == NoSeason:

            if (s->tempclass != NoSeason)
                tgmod = Env.temp_reduction[s->tempclass];

I don't believe that this affects current runs because we have been setting temp_class to 1 WarmSeason or 2 CoolSeason.

Suggested fix: replace above code with

		tgmod = (s->tempclass == NoSeason) ? 1. : Env.temp_reduction[s->tempclass];
@dschlaep dschlaep added bug in progress Task is currently in progress labels Jul 8, 2019
@dschlaep dschlaep added this to the feature_space milestone Jul 8, 2019
@dschlaep dschlaep self-assigned this Jul 8, 2019
dschlaep added a commit that referenced this issue Jul 8, 2019
the variable `tgmod` was un-initialized/had outdated value if `s->temp_class == NoSeason`

- close #332
@dschlaep
Copy link
Member Author

dschlaep commented Jul 8, 2019

closed by 18bfac0

@dschlaep dschlaep closed this as completed Jul 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug in progress Task is currently in progress
Projects
None yet
Development

No branches or pull requests

1 participant