What steps will reproduce the problem?
1. compile with gcc tsearch-example.c
2. ./a.out
3. Notice bogus characters printed by the w function.
What is the expected output? What do you see instead?
w prints garbage.
A revised version of w:
void w(const void *node, const VISIT which, const int depth) {
foo_t *f;
f = (foo_t *)node; /* wrong */
f = *(foo_t **)node; /* correct */
printf("%s: %d\n", f->name, f->value);
}
What version of the product are you using? On what operating system?
ubuntu 9.10
Please provide any additional information below.
See corrected code above.
David Anderson
Original issue reported on code.google.com by dave...@gmail.com on 4 Apr 2010 at 3:03
Original issue reported on code.google.com by
dave...@gmail.com
on 4 Apr 2010 at 3:03