summaryrefslogtreecommitdiff
path: root/cmd/nvedit.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/nvedit.c')
-rw-r--r--cmd/nvedit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/nvedit.c b/cmd/nvedit.c
index 8752ff475a..90f76bbc20 100644
--- a/cmd/nvedit.c
+++ b/cmd/nvedit.c
@@ -393,7 +393,7 @@ int do_env_ask(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
sprintf(message, "Please enter '%s': ", argv[1]);
} else {
/* env_ask envname message1 ... messagen [size] */
- for (i = 2, pos = 0; i < argc && pos < sizeof(message); i++) {
+ for (i = 2, pos = 0; i < argc && pos+1 < sizeof(message); i++) {
if (pos)
message[pos++] = ' ';