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

Add errorhandling to PowerManager. #950

Merged
merged 7 commits into from Sep 9, 2012

Conversation

stefanbeller
Copy link
Collaborator

No description provided.

powers.resize(input_id + 1);
} else id_line = false;

if (input_id < 1) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess removing this check with continue outside of if (infile.key == "id") will cause segfault when trying to write powers[negative number].something. You have added fprintf("skipping") to if (infile.key == "id"), so you will skip only vector resizing, while still trying to write other properties to invalid vector index.

clintbellanger added a commit that referenced this pull request Sep 9, 2012
Add errorhandling to PowerManager.
@clintbellanger clintbellanger merged commit 26e3ce9 into clintbellanger:master Sep 9, 2012
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

Successfully merging this pull request may close these issues.

None yet

3 participants