diff options
| author | Ada Christine <adachristine18@gmail.com> | 2024-02-24 16:19:40 +0000 |
|---|---|---|
| committer | Ada Christine <adachristine18@gmail.com> | 2024-02-24 16:19:40 +0000 |
| commit | 833a4c451e7d4bbe4330790773acac985999dcf6 (patch) | |
| tree | 9a1e2d944d49f04e87a2be99bba1a22f5f56edd7 /kjarna/efi | |
| parent | 2a0931f72c9b4d71fc3cd14c8014089c2eeba75f (diff) | |
only \r if string ends in \n
Diffstat (limited to 'kjarna/efi')
| -rw-r--r-- | kjarna/efi/file.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kjarna/efi/file.c b/kjarna/efi/file.c index 20c6ae0..517e09e 100644 --- a/kjarna/efi/file.c +++ b/kjarna/efi/file.c @@ -233,7 +233,8 @@ static ssize_t efi_console_write(EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *console, const } else { - ws[length] = L'\r'; + if (ws[length - 1] == L'\n') + ws[length] = L'\r'; efi_errno = console->OutputString(console, ws); } |
