Empty Datafiles
Gideon Weems

Hi. I noticed that empty datafiles are created as DAT_END, even though they might not be the last item in the array. Is this intended?

Empty datafiles are good for holding properties, but Allegro currently kills the property set and sets the type to DAT_END. This should not happen. The dat pointer is set to NULL, but that's expected.

I've checked the source, and the problem is simple: In load_file_object, the last datafile in the array is set to a DAT_END regardless of the number of the array length.

Peter Wang

Can you post a patch?

Gideon Weems

Sure! I'll try.

-- edit --

Okay, I've got something. I'll post it to the mailing list.

I noticed a similar problem with binary data; if nothing's grabbed, the properties are lost, and the item is invalid. I'll also look into that.

Thread #483695. Printed from Allegro.cc