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

Update Program.cs #1

Merged
merged 2 commits into from
Jun 15, 2020

Conversation

ThomasSmallert
Copy link
Contributor

titles is an array.

titles is an array.
@g3gg0
Copy link
Collaborator

g3gg0 commented Mar 29, 2020

Hello ThomasSellert,

thanks for your support and your contribution.
When looking closer at the code, you are right that a length check is missing.
Unfortunately just checking for a non-zero length is not sufficient.

It should be more like "titles != null && titles.Length > chapter" which should cover the
null-assignment in the case there is no json entry and the length check which should have been
there as the input data is user generated.

Do you want to update your PR to catch both?

regards,
g3gg0

Hello g3gg0,
Thank you very much. 
You're right. I have changed it at your suggestion. 
Greetings,
ThomasSmallert
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

2 participants