[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Confuse-devel] confuse bug?
From: |
Konstantin Sobolev |
Subject: |
[Confuse-devel] confuse bug? |
Date: |
Fri, 3 Aug 2007 16:14:27 +0400 |
Hi
It seems to me that this is a bug in confuse:
--- simple.c ---
#include "confuse.h"
int main(void)
{
int a, b;
cfg_opt_t opts[] = {
CFG_SIMPLE_INT("a", &a),
CFG_SIMPLE_INT("b", &b),
CFG_END()
};
cfg_t *cfg;
cfg = cfg_init(opts, 0);
cfg_parse(cfg, "simple.conf");
printf("a: %d\n", a);
printf("b: %d\n", b);
cfg_free(cfg);
return 0;
}
--------
--- simple.conf ---
a = 1
b = 2
------
output:
a: 0
b: 2
Adding another option, "c" with "c = 3" gives:
a: 0
b: 0
c: 3
My guess is that this is amd64-specific.
OS info:
Linux kos 2.6.22-gentoo-r1 #2 SMP PREEMPT Wed Aug 1 01:09:16 MSD 2007
x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ AuthenticAMD
GNU/Linux
Thanks.
--
/KoS
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Confuse-devel] confuse bug?,
Konstantin Sobolev <=