You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: