lineedit: initialize delptr
In vi mode, the 'p' and 'P' commands caused a segfault when nothing had been put in the buffer yet because the delptr was not initialized. Signed-off-by: Shawn J. Goff <shawn7400@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
380c8a0763
commit
46031da862
@ -187,6 +187,7 @@ extern struct lineedit_statics *const lineedit_ptr_to_statics;
|
|||||||
cmdedit_termw = 80; \
|
cmdedit_termw = 80; \
|
||||||
IF_FEATURE_EDITING_FANCY_PROMPT(num_ok_lines = 1;) \
|
IF_FEATURE_EDITING_FANCY_PROMPT(num_ok_lines = 1;) \
|
||||||
IF_USERNAME_OR_HOMEDIR(home_pwd_buf = (char*)null_str;) \
|
IF_USERNAME_OR_HOMEDIR(home_pwd_buf = (char*)null_str;) \
|
||||||
|
IF_FEATURE_EDITING_VI(delptr = delbuf;) \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
static void deinit_S(void)
|
static void deinit_S(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user