diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-04-15 13:21:01 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-04-15 13:21:01 +0000 |
commit | 0922192740ff5dc9eda18d9d7dac03b37d92f7cd (patch) | |
tree | 5bc7e80ac2b104cc429dd613bdbf7a4786d3a4ce | |
parent | 84f75b0b94e73ab4d491825181cf74051751dad0 (diff) | |
download | busybox-w32-0922192740ff5dc9eda18d9d7dac03b37d92f7cd.tar.gz busybox-w32-0922192740ff5dc9eda18d9d7dac03b37d92f7cd.tar.bz2 busybox-w32-0922192740ff5dc9eda18d9d7dac03b37d92f7cd.zip |
lineedit: state->hist_file doesn't exist if !FEATURE_EDITING_SAVEHISTORY,
#ifdef it out
-rw-r--r-- | libbb/lineedit.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 4fc5e7a61..3cb9c3e28 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c | |||
@@ -948,8 +948,10 @@ static void remember_in_history(const char *str) | |||
948 | state->history[i++] = xstrdup(str); | 948 | state->history[i++] = xstrdup(str); |
949 | state->cur_history = i; | 949 | state->cur_history = i; |
950 | state->cnt_history = i; | 950 | state->cnt_history = i; |
951 | #if ENABLE_FEATURE_EDITING_SAVEHISTORY | ||
951 | if ((state->flags & SAVE_HISTORY) && state->hist_file) | 952 | if ((state->flags & SAVE_HISTORY) && state->hist_file) |
952 | save_history(state->hist_file); | 953 | save_history(state->hist_file); |
954 | #endif | ||
953 | USE_FEATURE_EDITING_FANCY_PROMPT(num_ok_lines++;) | 955 | USE_FEATURE_EDITING_FANCY_PROMPT(num_ok_lines++;) |
954 | } | 956 | } |
955 | 957 | ||