Skip to content

Commit 5d0d6ed

Browse files
committed
Update command length check in finsh_handle_normal_key to use 'greater than or equal' condition
1 parent b99cde0 commit 5d0d6ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/finsh/shell.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,7 @@ static void finsh_handle_normal_key(char ch)
12021202
}
12031203
#endif /* FINSH_USING_SNAPSHOT */
12041204

1205-
if (shell->cmd_length > FINSH_CMD_SIZE)
1205+
if (shell->cmd_length >= FINSH_CMD_SIZE)
12061206
{
12071207
_finsh_clear_command();
12081208
rt_kprintf("Command length exceeds the maximum limit!\n");

0 commit comments

Comments
 (0)