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

[BUG] Input validation #1428

Open
shrivalidutt opened this issue Oct 8, 2024 · 6 comments
Open

[BUG] Input validation #1428

shrivalidutt opened this issue Oct 8, 2024 · 6 comments

Comments

@shrivalidutt
Copy link

Description

The input validation logic in placex() and placey() is somewhat convoluted and can lead to an infinite loop if the user does not enter a valid position.

Expected behavior

If the user enters an invalid position, they should be prompted to enter a valid number without causing the program to get stuck in an infinite loop.

Actual behavior

leads to an infinite loop if the user does not enter a valid position.

Possible fix

adding input validation

Steps to reproduce

Execute the compiled program When prompted, enter an invalid move, such as a number outside the range of 1-9 or a letter.
the program keeps prompting for input without handling invalid cases, it may cause an infinite loop if the input is never valid

Context

While trying to check what the output will be in case an invalid input is provided i came across this issue

Additional information

No response

@VyankateshRohokale
Copy link

ok , will check it out

@siya0106
Copy link

/assign

@Zaki2409
Copy link

Hi @shrivalidutt , I would like to contribute on this. Can you assign me this issue?

/assign

@YdvAkash
Copy link

in which file code of function present ?

@VyankateshRohokale
Copy link

in which file code of function present ?

you can contribute to it in sorting folder , and add a file in it and write your code

Copy link
Contributor

This issue has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants