mirror of
https://github.com/limine-bootloader/limine
synced 2025-01-23 13:02:15 +03:00
Teach qloader2 to handle windows line endings
This commit is contained in:
parent
8ac26c40eb
commit
21490a84d3
BIN
qloader2.bin
BIN
qloader2.bin
Binary file not shown.
@ -22,6 +22,15 @@ int init_config(int drive, int part) {
|
||||
|
||||
fread(&f, config_addr, 0, f.size);
|
||||
|
||||
// remove windows carriage returns, if any
|
||||
for (size_t i = 0; i < f.size; i++) {
|
||||
if (config_addr[i] == '\r') {
|
||||
for (size_t j = i; j < f.size - 1; j++)
|
||||
config_addr[j] = config_addr[j+1];
|
||||
f.size--;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user