X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=config.c;h=41066e4f4e0408b23068e9a75911784cbefc65ac;hb=be65e7d9fbd3ae6fc097cedade2afe39805fcf4e;hp=47734140dd4e44b88a9bf620dcd628381e1dd5f3;hpb=476d23980417ea0b476735d1ad971f9b66b4e032;p=git.git diff --git a/config.c b/config.c index 47734140..41066e4f 100644 --- a/config.c +++ b/config.c @@ -335,8 +335,11 @@ 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; + store.offset[store.seen] = ftell(config_file); + } } return 0; }