Fix config bug (2)
This commit is contained in:
parent
78d1b8a8fc
commit
e7669cadae
BIN
qloader2.bin
BIN
qloader2.bin
Binary file not shown.
@ -17,12 +17,11 @@ int init_config(int drive, int part) {
|
||||
}
|
||||
}
|
||||
|
||||
config_addr = balloc(f.size + 1);
|
||||
size_t config_size = f.size + 1;
|
||||
config_addr = balloc(config_size);
|
||||
|
||||
fread(&f, config_addr, 0, f.size);
|
||||
|
||||
size_t config_size = f.size;
|
||||
|
||||
// remove windows carriage returns, if any
|
||||
for (size_t i = 0; i < config_size; i++) {
|
||||
if (config_addr[i] == '\r') {
|
||||
@ -32,8 +31,6 @@ int init_config(int drive, int part) {
|
||||
}
|
||||
}
|
||||
|
||||
config_addr[config_size-1] = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user