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

wrong variable being compared #12

Open
Hallocoos opened this issue Jul 23, 2019 · 4 comments
Open

wrong variable being compared #12

Hallocoos opened this issue Jul 23, 2019 · 4 comments

Comments

@Hallocoos
Copy link

Hi! Error I found in this function. https://github.com/jraleman/42_Exam-C/edit/master/level02/max.c

In this function, the while loop should be:
while (len--)
{
if (maxvalue < tab[i])
maxvalue = tab[i];
i++;
}
otherwise it only ends up comparing the last two integers in the array and returns the wrong result.

@jraleman
Copy link
Owner

Nice catch! Feel free to make a PR if you want to. :]

@Hallocoos
Copy link
Author

Hallocoos commented Jul 24, 2019 via email

@jraleman
Copy link
Owner

Sorry, what is a PR?

On Wed, Jul 24, 2019, 10:09 Jose Ramon Aleman @.***> wrote: Nice catch! Feel free to make a PR if you want to. :] — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#12?email_source=notifications&email_token=AK6FMA3LMQWCQQLFB4AZKDDQBAE4VA5CNFSM4IGD4QKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2VRCRA#issuecomment-514527556>, or mute the thread https://github.com/notifications/unsubscribe-auth/AK6FMA7YWGUQZRLBQ24MFETQBAE4VANCNFSM4IGD4QKA .

It's a pull request.
So first, you want to make a fork of the repo, and make the changes in your repo, preferable in a new branch.
Commit the changes and do a pull request to this repo.

@Hallocoos
Copy link
Author

Hallocoos commented Jul 28, 2019 via email

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

No branches or pull requests

2 participants