config: Fix bug where macro definitions were not skipped over properly when parsing

This commit is contained in:
mintsuki 2023-10-29 04:22:51 +01:00
parent 728ef7fd5c
commit ed3e366342
1 changed files with 8 additions and 1 deletions

View File

@ -253,10 +253,17 @@ int init_config(size_t config_size) {
panic(true, "config: Malformed macro usage");
}
}
if (config_addr[i] != '=') {
if (config_addr[i++] != '=') {
i = orig_i;
goto next;
}
while (config_addr[i] != '\n' && config_addr[i] != 0) {
i++;
if (i >= config_size) {
bad_config = true;
panic(true, "config: Malformed macro usage");
}
}
continue;
}