Being a C/C++/Java/D/Python programmer, Lite-C's semantics have me confused at times.

Look at the following function:

Code:
function vec_dump(STRING * name, VECTOR* vec )
{
	if ( name==NULL ) return;
	diag_var( "%s", name );
	if ( vec==NULL )  diag("NULL"); 
	else {
	diag_var(" x=%f", vec.x );
        diag_var(" y=%f", vec.y );
	diag_var(" z=%f\n", vec.z );
	}
}


void main()
{
	VECTOR foo ;
	vec_set( foo, vector(1,2,3) );
	vec_dump( "Show Me", foo );
}


The vec_dump function crashes when the passed VECTOR* is accessed.

PS. I realize I am passing a stack object(foo) to a pointer function but the manual explains Lite-C converts structs references to struct pointers.