fix pointer thingy
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@478 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
parent
5ae7201c37
commit
a649b013ac
|
@ -77,7 +77,7 @@ struct zap_config {
|
||||||
/*! FILE stream buffer to the opened file */
|
/*! FILE stream buffer to the opened file */
|
||||||
FILE *file;
|
FILE *file;
|
||||||
/*! path to the file */
|
/*! path to the file */
|
||||||
const char *path;
|
char path[512];
|
||||||
/*! current category */
|
/*! current category */
|
||||||
char category[256];
|
char category[256];
|
||||||
/*! current section */
|
/*! current section */
|
||||||
|
|
|
@ -69,7 +69,7 @@ int zap_config_open_file(zap_config_t *cfg, const char *file_path)
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg->file = f;
|
cfg->file = f;
|
||||||
cfg->path = path;
|
zap_set_string(cfg->path, path);
|
||||||
|
|
||||||
while (zap_config_next_pair(cfg, &var, &val)) {
|
while (zap_config_next_pair(cfg, &var, &val)) {
|
||||||
if ((cfg->sectno != last) && !strcmp(cfg->section, file_path)) {
|
if ((cfg->sectno != last) && !strcmp(cfg->section, file_path)) {
|
||||||
|
@ -86,7 +86,7 @@ int zap_config_open_file(zap_config_t *cfg, const char *file_path)
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
cfg->file = f;
|
cfg->file = f;
|
||||||
cfg->path = path;
|
zap_set_string(cfg->path, path);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue