X-Git-Url: https://git.octo.it/?p=git.git;a=blobdiff_plain;f=config.c;fp=config.c;h=a3e14d76e54e05887545765dabda11b1bc2af748;hp=4e1f0c22862b8c8605dbbf3a83ec4e87d9059513;hb=93ddef3e2dd5f7f3238fad9d52e974d03c7844f2;hpb=7abd7117ec57b8c3c2a469db62c7811fdac5c655 diff --git a/config.c b/config.c index 4e1f0c22..a3e14d76 100644 --- a/config.c +++ b/config.c @@ -335,8 +335,9 @@ static int store_aux(const char* key, const char* value) store.offset[store.seen] = ftell(config_file); store.state = KEY_SEEN; store.seen++; - } else if(!strncmp(key, store.key, store.baselen)) - store.state = SECTION_SEEN; + } else if (strrchr(key, '.') - key == store.baselen && + !strncmp(key, store.key, store.baselen)) + store.state = SECTION_SEEN; } return 0; }