normanr commented on a change in pull request #771: URL: https://github.com/apache/incubator-nuttx-apps/pull/771#discussion_r776153873
########## File path: system/readline/readline_common.c ########## @@ -601,6 +601,8 @@ ssize_t readline_common(FAR struct rl_common_s *vtbl, FAR char *buf, buf[nch++] = g_cmdhist.buf[idx][i]; RL_PUTC(vtbl, g_cmdhist.buf[idx][i]); } + + buf[nch] = '\0'; Review comment: This should probably be just before the strcmp, otherwise if you run `foobar` and `fooba`, then the latter doesn't get saved. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org