7xGit / 7xGit/7xGit_Task3

Input Not Validated for Non-Numeric Values

未关闭 适合新手
#4 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
enhancement good first issue
主要语言
C++
星标
1
派生
4
PR 合并指标
30 天内没有已合并 PR

描述

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.

贡献指南

这个仓库没有索引到贡献指南

调研方向

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.

由索引模型根据 Issue 内容生成。

评估

技术栈
cpp
领域
cli
Issue 类型
缺陷
难度
2/5
预计耗时
1-3 小时
活跃度
停滞
描述清晰度
描述清楚
新手友好度
65/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。