Teach qloader2 to handle windows line endings

This commit is contained in:
mintsuki 2020-07-02 02:51:06 +02:00
parent 8ac26c40eb
commit 21490a84d3
2 changed files with 9 additions and 0 deletions

Binary file not shown.

View File

@ -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;
}