|
|
My experience with C is limited to what I've seen in the POV-Ray source
code. (Most of my programming experience is in C++.) As a result, this
typecasting of structs into other types of structs is confusing to me.
Anyway, is there a simple explanation for the fact that whenever I add a
property to something like OBJECT_FIELDS, I get an error in some random
place when another property of OBJECT_FIELDS is accessed?
Specifically, I added a DBL into OBJECT_FIELDS:
#define OBJECT_FIELDS \
...
SNGL Ph_Density; \
DBL My_DBL; \
unsigned long Flags;
And then, later in the code, when I try to render a scene, a line in
parse.cpp causes an error:
if (Object->Type & LT_SRC_UNION_OBJECT)
Obviously I'm screwing up the Object struct somehow, and it must have to do
with some sort of subtle memory issue. Is this something that someone could
easily explain? I'd appreciate any help anyone could give as to what causes
this.
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
|