mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-18 18:03:31 +08:00
确保char line[]最后一位为'\0'
This commit is contained in:
parent
b809c02015
commit
adceb3e2a4
@ -78,7 +78,7 @@ struct finsh_shell
|
||||
struct finsh_parser parser;
|
||||
#endif
|
||||
|
||||
char line[FINSH_CMD_SIZE];
|
||||
char line[FINSH_CMD_SIZE + 1];
|
||||
rt_uint16_t line_position;
|
||||
rt_uint16_t line_curpos;
|
||||
|
||||
@ -107,4 +107,3 @@ const char *finsh_get_password(void);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user