From 704f61fcafc0b5b8e8dfff8e56821feb556b40c0 Mon Sep 17 00:00:00 2001 From: Joursoir Date: Wed, 15 Dec 2021 15:13:29 +0300 Subject: widget/input: fix the possibility of deletion at the extreme point --- Library/UefiShellUfmCommandLib/widget/input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Library/UefiShellUfmCommandLib/widget') diff --git a/Library/UefiShellUfmCommandLib/widget/input.c b/Library/UefiShellUfmCommandLib/widget/input.c index 3fbb1b2..ed6738b 100644 --- a/Library/UefiShellUfmCommandLib/widget/input.c +++ b/Library/UefiShellUfmCommandLib/widget/input.c @@ -76,7 +76,7 @@ VOID input_handle_char(struct widget_input *in, EFI_INPUT_KEY key) case 0x0: break; case CHAR_BACKSPACE: { - if(in->buf_len == 0) + if(in->buf_len == 0 || in->point == 0) break; for(i = in->point; i < in->buf_len; i++) -- cgit v1.2.3-18-g5258