also do it on the first line

This commit is contained in:
Benji Dial 2022-03-20 20:38:37 -04:00 committed by GitHub
parent 4df856f3dc
commit 66e3c5ef5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -151,7 +151,8 @@ int init_config(size_t config_size) {
for (size_t i = 0; i < config_size; i++) {
size_t skip = 0;
while ((config_addr[i + skip] == '\r')
|| (i && config_addr[i - 1] == '\n' && config_addr[i + skip] == ' ')) {
|| ((!i || config_addr[i - 1] == '\n')
&& config_addr[i + skip] == ' ')) {
skip++;
}
if (skip) {