mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2025-01-25 21:31:32 +01:00
strip line endings from .VolumeLabel.txt
This commit is contained in:
parent
629baca0ee
commit
932b218617
@ -990,6 +990,10 @@ static EFI_STATUS ScanVolume(IN OUT REFIT_VOLUME *Volume)
|
||||
Status = FileHandle->Read(FileHandle, &BufferSize, Buffer);
|
||||
FileHandle->Close(FileHandle);
|
||||
if (!EFI_ERROR(Status)) {
|
||||
// strip line endings
|
||||
while (BufferSize > 0 && (Buffer[BufferSize-1]=='\n' || Buffer[BufferSize-1]=='\r')) {
|
||||
Buffer[--BufferSize]='\0';
|
||||
}
|
||||
Volume->VolLabel = PoolPrint(L"%a", Buffer);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user