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 7cd46f3d26
commit cad3c72fce

View File

@ -253,10 +253,17 @@ int init_config(size_t config_size) {
panic(true, "config: Malformed macro usage"); panic(true, "config: Malformed macro usage");
} }
} }
if (config_addr[i] != '=') { if (config_addr[i++] != '=') {
i = orig_i; i = orig_i;
goto next; 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; continue;
} }