Quote Originally Posted by laserlight View Post
Not your code snippets; the result you observed given the code snippet. After all, it was this unexpected result that led you here, and indeed given the logic expressed by your code snippet, what you observed does sound impossible.
And it is.

I made two stupid mistakes:

1) I got my globals wrong and defined them as static in main.c rather than in gui/guiglb.c with extern definitions in gui/guiglb.h. How I made that mistake is unfathomable - tired old brain, I suppose.
2) I assumed that I had put a breakpoint after the assignment loop, but what I actually did was put it elsewhere. The program stopped because I had added --g-fatal-warnings to the gdb command.

The basic problem was that the flentry[] was supposed to be a global, but wasn't. So when it went out of context... poof!

Fixed now

Thanks for all your help (including john.c, but if you weren't so aggressive I might have taken more notice. For God's sake, lighten up.)

And my apologies for having wasted your time on my stupidity.