Input Not Validated for Non-Numeric Values
- Ngôn ngữ chính
- C++
- Star
- 1
- Fork
- 4
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Title:
Crash on Non-Numeric Input
Description:
When a player enters non-numeric input for the row or column, the game crashes. The program does not handle invalid input types (like letters or symbols), causing it to terminate unexpectedly.
Steps to Reproduce:
Start the game.
Enter a letter or symbol instead of a number when prompted for the row or column.
The game crashes.
Expected Behavior:
The game should prompt the player to enter a valid numeric value instead of crashing.
Suggested Fix:
Use input validation to ensure only integers are accepted for the row and column inputs.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Look for the code that reads player input for row and column, likely in a main game loop or input function. Add validation to check if the input is a valid integer before processing. Test by running the game and entering letters or symbols to ensure it prompts for valid input instead of crashing.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- cpp
- Lĩnh vực
- cli
- Loại issue
- Lỗi
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 65/100