Correct Backspace behavior in input dialog
All checks were successful
Builds / ExectOS (i686, debug) (push) Successful in 33s
Builds / ExectOS (amd64, debug) (push) Successful in 35s
Builds / ExectOS (i686, release) (push) Successful in 40s
Builds / ExectOS (amd64, release) (push) Successful in 42s

This commit is contained in:
Aiken Harris 2025-09-01 11:40:48 +02:00
parent 72a832f190
commit 0fa4a175e0
Signed by: harraiken
GPG Key ID: C40F06CB7493C1F5

View File

@ -856,9 +856,9 @@ BlDisplayInputDialog(IN PWCHAR Caption,
/* Check if buffer is not empty */
if(InputFieldLength > 0 && TextPosition > 0 && TextPosition <= InputFieldLength)
{
/* Delete character */
RtlMoveMemory(InputFieldBuffer + TextPosition, InputFieldBuffer + TextPosition + 1,
(InputFieldLength - TextPosition) * sizeof(WCHAR));
/* Move memory to overwrite the character to the left of the cursor */
RtlMoveMemory(InputFieldBuffer + TextPosition - 1, InputFieldBuffer + TextPosition,
(InputFieldLength - TextPosition + 1) * sizeof(WCHAR));
/* Decrement length, position and null terminate string */
TextPosition--;