mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2025-01-26 21:41:29 +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);
|
Status = FileHandle->Read(FileHandle, &BufferSize, Buffer);
|
||||||
FileHandle->Close(FileHandle);
|
FileHandle->Close(FileHandle);
|
||||||
if (!EFI_ERROR(Status)) {
|
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);
|
Volume->VolLabel = PoolPrint(L"%a", Buffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user