mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-07-04 16:42:14 +02:00
stage2 loader: Fix loadlist parsing breaking out of the loop too early
This commit is contained in:
parent
54a1529ef4
commit
1149665402
@ -110,20 +110,22 @@ void parse_loadlist(const char *ll) {
|
|||||||
/* Load the entry. */
|
/* Load the entry. */
|
||||||
load_list_entry(entry);
|
load_list_entry(entry);
|
||||||
/* Skip to the next delimiter. */
|
/* Skip to the next delimiter. */
|
||||||
for (; *p == ' ' || *p == '\t'; p++) { }
|
for (; *p == ' ' || *p == '\t' || *p == '\x00'; p++) { }
|
||||||
if (*p == '\x00') {
|
if (*p != '|') {
|
||||||
break;
|
|
||||||
} else if (*p != '|') {
|
|
||||||
printk("Error: Load list is malformed!\n");
|
printk("Error: Load list is malformed!\n");
|
||||||
generic_panic();
|
generic_panic();
|
||||||
} else {
|
} else {
|
||||||
/* Skip to the next entry. */
|
/* Skip to the next entry. */
|
||||||
for (; *p == ' ' || *p == '\t'; p++) { }
|
for (; *p == ' ' || *p == '\t' || *p == '|'; p++) { }
|
||||||
entry = p;
|
entry = p;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
p++;
|
p++;
|
||||||
|
if (*p == '\x00') {
|
||||||
|
/* We're at the end of the line, load the last entry */
|
||||||
|
load_list_entry(entry);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user