Re: [AD] Empty Datafile Bug

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sat, 2005-04-23 at 07:45 -0400, happysad@xxxxxxxxxx wrote:
> Please don't commit this without having someone taking a good
> look.  Attached is a small patch for datafile.c.  I noticed that empty
> datafiles within a datafile result in the empty one being turned into
> a DAT_END.  Here's an example; I hope you're viewing with a
> mono-spaced font:
> 
> FILE  - File1
> FILE  |- File2   <-- Problem
> BMP   |- Bitmap
> 
> As a DAT_END, File2 prevents access to the bitmap.  The attached patch
> circumvents this with an explicit check for empty datafiles in
> load_file_object.  If one is found, a FILE is created just for the
> property set--no data.  I chose not to call load_object on this file,
> as it didn't fit well into the loop and I'm not sure how safe it would
> be.   The assignments are simple.
> 
> No warnings were generated by the patch.  I tested with a datafile and
> experienced no problems.

Thanks for the new patch.. it's much more readable :) Anyway, I don't
understand. Can you tell me what I need to do e.g. in grabber to
reproduce?

-- 
Elias Pschernig





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/