Solved the sizeof() problem. Size is now calculated by hand, making use of the sentinel.

Thanks to
http://stackoverflow.com/questions/12873142/invalid-application-of-sizeo
f-to-incomplete-type-struct-array helping me spot the mistake!